After uses FireDAC.VCLUI.Wait, you do not have to add tfdguixwaitcursor
Tfdconnection //Data connection //Data query tdatasource //Data source TDBGrid //Data display //uses FireDAC.Phys.SQLite, no need to add tfdphyssqlitedriverlink //access to SQLite file database
Procedure Tform1.formcreate (sender:tobject); begin Fdquery1.connection: = FDConnection1; Fdconnection1.loginprompt:=false; Cancel Login Prompt Box datasource1.dataset: = FDQuery1; Dbgrid1.datasource: = DataSource1; Fdconnection1.open (' Driverid=sqlite;database=test1. Sqlite3 '); E:\Delphi10.2\FireDAC Learning \1111111\win32\debug //Database file test1. Sqlite3, must be placed in the EXE directory in order to use the relative path fdquery1.open (' SELECT * from aTable '); end;
Uses FIREDAC.PHYS.MSACC, you do not have to add FDPHYSMSACCESSDRIVERLINK1 //access to the Access MDB file database
Procedure Tform1.formcreate (sender:tobject); begin Fdquery1.connection: = FDConnection1; Fdconnection1.loginprompt:=false; Cancel Login Prompt Box datasource1.dataset: = FDQuery1; Dbgrid1.datasource: = DataSource1; Fdconnection1.open (' Driverid=msacc;database=test.mdb '); E:\Delphi10.2\FireDAC Learning \1111111\win32\debug //Database file Test.mdb, must be placed in the EXE directory in order to use the relative path fdquery1.open ( ' SELECT * from aTable '); end;
Execute SQL insertprocedure Tform1.button1click (sender:tobject); begin Fdquery1.active:=false; FDQuery1.SQL.Clear; FDQUERY1.SQL.ADD ( ' insert into aTable values (145, ' Asdfa ', ' 33sdfs3 ') ' ); Fdquery1.execsql; Execute SQL fdquery1.open (' SELECT * from aTable '); Show update data end;
On the Firedac of SQLite