Hi,
I would like to connect to a SQL Compact 4 database using dbexpress driver in Delphi XE4.
When I try to open the connection this error occours:
'The database file cannot be open with the current version of SQL Server Compact Edition'.
If I use your test.sdf database all works.
The problem occours also if I open the connection in Delphi IDE. I think used driver is 3.5, bu I need version 4.
How can I open a version 4 sdf database from Ide and at runtime?
Thank you.
Connection error with SQL Server Compact 4
Re: Connection error with SQL Server Compact 4
Hello,
Such error means that you are using not the correct SQL Server Compact client version to connect to a compact database. To connect to a compact database version 4, you should set the VendorLib connection parameter to sqlceoledb40.dll . Here is a code example:
Such error means that you are using not the correct SQL Server Compact client version to connect to a compact database. To connect to a compact database version 4, you should set the VendorLib connection parameter to sqlceoledb40.dll . Here is a code example:
Code: Select all
SQLConnection.Params.Values['VendorLib'] := 'sqlceoledb40.dll';
Re: Connection error with SQL Server Compact 4
Hello,
thank you for your suggestion. It works great.
Alessandro
thank you for your suggestion. It works great.
Alessandro
Re: Connection error with SQL Server Compact 4
I am glad I could help. If any other questions come up, please contact us.