Using FireDAC

From RAD Studio
Jump to: navigation, search

Go Up to Multi-Device Development (FireDAC)

Generalities

For multi-device development, FireDAC supports the following platforms:

  • Windows x86 and x64
  • OS X x86
  • iOS
  • Android

In general, FireDAC application development for OS X, iOS, and Android is similar to that for Windows, but there are several different aspects:

  • The GUIx components must have Provider = 'FMX' to use FireMonkey, or 'Console' to use console implementation for FireDAC GUI components. Note that switching to Provider = 'FMX' or 'Console' may require you to delete FireDAC.VCLUI.Xxx units from the "uses" clauses.
  • Try to avoid specifying design-time paths for FireDAC properties, such as TFDPhysDriverLink.VendorLib or TFDCustomManager.ConnectionDefFileName. Use default values, FireDAC configuration files or path variables.
  • An application and a DBMS client dynamic library bitness must be the same. x86 executable uses x86 libraries. x64 executable uses x64 libraries.
  • On Mac OS, the ODBC-based drivers (SQL Server, IBM DB2, SQL Anywhere) may require explicit ODBC driver specification, using the TFDPhysXxxxDriverLink.ODBCDriver property or configuration file.
  • The Microsoft Access driver is supported only on Windows platforms.
  • Only InterBase and SQLite drivers are supported for mobile iOS and Android platforms.
  • The Microsoft SQL Server ODBC driver and FreeTDS ODBC driver have a quite different behavior and quality.
  • The SQLite driver supports static linking only for Win32 and Win64. For other platforms, the dynamic libraries must be provided.
  • Utilities are provided for Windows only.

Configuring FireDAC

The following steps are required in order to use persistent connection definitions or virtual drivers, shared by several applications:

  1. Go to C:\Users\Public\Documents\Embarcadero\Studio\FireDAC
  2. Drag FDConnectionDefs.ini and drop it to your project (in the Project Manager).
  3. Click the Yes button to add it to your project.
  4. Drag FDDrivers.ini and drop it to your project (in the Project Manager).
    Note: This file is optional.
  5. Click the Yes button to add it to your project.
  6. Open the Deployment Manager (go to Project > Deployment).
  7. Set the Remote Path of the selected target:
    • For OS X platform: Contents\MACOS
    • For iOS platforms: StartUp\Documents
    • For Android platform: assets\internal

See Also