On the Firedac of SQLite

Source: Internet
Author: User
Tags sqlite win32

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

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.