Preparation: 1. Create a SQLite database with Sqliteexpertpers. 2. Open the Delphi Xe7. Firedac method to set up a library join 1. Put the FDConnection1 control 2. Put in Fdconnection1.drivername: = SQLite3. Click "Fdconnection1.params" 4. Fdconnection1.params "Write driverid=sqlite database=c:\users\zhujianqiang\desktop\sqlite\sqlite.db //your SQLite database path 5. Point "OK" 6. Set fdconnection1.connected to True. Set table joins 1. Put the FDQuery1 control 2. Set Fdquery1.connection to FDConnection1. 3. Click Set Fdquery1.sql. 4. Write select * from Tmanual in FDQuery1.SQL.Text. 5. Set Fdquery1.active to True. Set up a data bridge 1. Put the DataSource1 control 2. Set Datasource1.dataset to FDQuery1. Set data display 1. Put the DBGRID1 control 2. Set Dbgrid1.datasource to DataSource1. PS: In the form or data module must be placed in the FDPHYSSQLITEDRIVERLINK1, FDGUIxWaitCursor1 these two controls. A friend said it was equal to registering the DLL. SQL control method to set up a library join 1. Put the SQLConnection1 control 2. Set sqlconnection1.connectionname* to Sqliteconnection. 3. Set the database in Sqlconnection1.params to C:\Users\zhujianqiang\Desktop\sqlite\sqlite.db // Your SQLite database path 4. Point "OK" 5. Set sqlconnection1.connected to True. Set table joins 1. Put the SQLQuery1 control 2. Set Sqlquery1.sqlconnection to SQLConnection1. 3. Set SQLQuery1.SQL. 4. Write select * from Tmanual in SQLQuery1.SQL.Text. 5. Set Fdquery1.active to True. Set data conversion 1. Put in DataSetProvider1. 2. Set Datasetprovider1.dataset to SQLQuery1. 3. Insert ClientDataSet1. 4. Set Clientdataset1.providername to DataSetProvider1. Set up a data bridge 1. Put the DataSource1 control 2. Set Datasource1.dataset to ClientDataSet1. Set data display 1. Put the DBGRID1 control 2. Set Dbgrid1.datasource to DataSource1.
DelphiXE7 manipulate the SQLite database