I did not post code because the error appeared at the initial stage. Here is all the code. I have // some of the code in an effort to isolate the cause.
unit uSAIME;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, db, dbf, FileUtil, Forms, Controls, Graphics, Dialogs,
StdCtrls, DbCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
PA1: TDataSource;
PA: TDbf;
YM1: TDataSource;
YM: TDbf;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
YM.Open;
// PA.Open;
// YM.Edit;
// PA.Edit;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Close;
end;
end.