preparatory work:1. Build a SQLite database with Sqliteexpertpers. 2. Open the Delphi Xe7. First, FIREDAC lawset up library joins1. Put the FDConnection1 control2. Click "Fdconnection1.params"3. Write in "Fdconnection1.params"Driverid=sqlitedatabase=c:\users\zhujianqiang\desktop\sqlite\sqlite.db//Your SQLite database path4. Point "OK"5. Set fdconnection1.connected to True. Set table joins1. Put the FDQuery1 control2. 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. setting up the data bridge1. Put the DataSource1 control2. Set Datasource1.dataset to FDQuery1. set up data display1. Put the DBGrid1 control2. 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. second, the SQL control methodset up library joins1. Put the SQLConnection1 control2. Set sqlconnection1.connectionname* to Sqliteconnection. 3. Set the database in the Sqlconnection1.paramsfor C:\Users\zhujianqiang\Desktop\sqlite\sqlite.db//Your SQLite database path4. Point "OK"5. Set sqlconnection1.connected to True. Set table joins1. Put the SQLQuery1 control2. Set Sqlquery1.sqlconnection to SQLConnection1. 3. Set the Sqlquery1.sql. 4. Write select * from Tmanual in SQLQuery1.SQL.Text. 5. Set Fdquery1.active to True. Setting up data Transformations1. Insert DataSetProvider1. 2. Set Datasetprovider1.dataset to SQLQuery1. 3. Insert ClientDataSet1. 4. Set Clientdataset1.providername to DataSetProvider1. setting up the data bridge1. Put the DataSource1 control2. Set Datasource1.dataset to ClientDataSet1. set up data display1. Put the DBGrid1 control2. Set Dbgrid1.datasource to DataSource1.
Delphi Xe7 Operation SQLite Database