DelphiXE7 Manipulating SQLite database

Source: Internet
Author: User
Tags joins sqlite sqlite database

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.