Connect to Microsoft SQL Server Compact Edition (FireDAC)
Go Up to Database Connectivity (FireDAC)
Currently, FireDAC does not have a native Microsoft SQL Server CE driver, but you can use the FireDAC DBX bridge driver to connect to Microsoft SQL Server CE.
Note: Microsoft SQL CE is quite different from normal SQL Servers and does not have an ODBC driver. So it does not function with the same FireDAC Microsoft SQL driver code base. The new R&D needs to fully support Microsoft SQL CE.
However, for the moment, you can work with the database via the FireDAC DBX bridge driver. Working via the FireDAC DBX bridge driver, you are still able to use all the other general FireDAC features, such as:
- Data type mapping
- Array DML
- SQL scripting
- and so on
Connect Using FireDAC/DBX Bridge
To connect to Microsoft SQL CE, do the following:
- Download and install DevArt dbExpress driver for Microsoft SQL Server.
- Create a connection definition, such as the following one:
[My_MSSQL_CE] DriverID=TDBX DriverName="SQLServer Compact" Database=c:\mydb.sdf
- Drop TFDConnection to the form.
- Set FDConnection1.ConnectionDefName to My_MSSQL_CE.