Лежит здесь
I:\Projects\Embarcadero\Delphi\Server-Client\étoile\Serveur\Win64\Debug\BD\UserBD.mdb
функция
function TForm2.BDconnected(S3: string; S2, S1: Tobject): string;
begin
if s1 is TFDConnection then
begin
TFDConnection(s1).Params.DriverID:='MSAcc';
TFDConnection(s1).Params.Database:=S3;
//TFDConnection(s1).Params.AddPair('ODBCAdvanced','DefaultDir='+s3+'DriverId=25;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UserCommitSync=Yes');
TFDConnection(s1).Connected := True;
end;
if s1 is TFDQuery then
begin
TFDQuery(s2).SQL.Text:='Select*From User_Grid';
TFDQuery(s2).Active:=true;
end;
end;
end.
функция вызова
procedure TForm1.CornerButton1Click(Sender: TObject);
var DatabaseFilePath,AppDirPath:string;
begin
AppDirPath := ExtractFilePath(ParamStr(0)); DatabaseFilePath := AppDirPath + 'BD\UserBD.mdb';
Form2.BDconnected(DatabaseFilePath,Form2.FDQuery1, Form2.FDConnection1);
end;
Вот такая ошибка: