Embarcadero RAD Studio XE

This tutorial describes the basic steps to use SQLite as a local data storage on your mobile device through the FireDAC framework.

使用FireDAC來連結資料庫

FireDAC is a unique set of Universal Data Access Components for developing multi-device database applications for Delphi and C++Builder. With its powerful common architecture, FireDAC enables native high-speed direct access from Delphi to InterBase, SQLite, MySQL, SQL Server, Oracle, PostgreSQL, IBM DB2, SQL Anywhere, Access, Firebird, Informix, and more. The FireDAC native driver supports SQLite database version 3.0 and later. For a detailed discussion on SQLite usage in FireDAC for a Delphi application, read the "Using SQLite with FireDAC" article. To use SQLite in your application, the sqlite3.dll file must be present on your development system. If this file is not present, download sqlite3.dll from http://www.sqlite.org/download.html to your system path (such as C:\Windows\SysWOW64 for 64-bit Windows).

設計和設定使用者介面

建立一個新專案-選擇Multi-Device Application

  1. 在表單上放置一個 TFDConnection元件
  2. 在TFDConnection元件按右鍵,選擇 Connection Editor
  3. In the FireDAC Connection Editor, set the following parameters of the TFDConnection:
    1. w1
    2. 23

使用LiveBindings精靈