Page 1 of 1

SQLite, Delphi XE2 Win64

Posted: Mon 17 Oct 2011 21:21
by FerCastro
Hello fiends

I have an application working on

Delphi XE (32 bits)
Sqlite (Unidac)
Windows 7 32

I have Delphi XE2, Unidac 4 and Windows 7-64

I have the 64 bits SQlite binaries, i I have compiled my source code, but when i try to open my database it seems my application try to open the 32 bits dll.

is there a trick or uncoomented tip? thanks and best regards

This is my code, the commented line works fine with win32 sqlite dll

Code: Select all


DM.Conexion.ProviderName := 'SQLITE';

// DM.Conexion.Server := GetCurrentDir + '\sqlite3.dll';    

DM.Conexion.Server := GetCurrentDir + '\System.Data.SQLite.dll';  

DM.Conexion.Database := GetCurrentDir + '\data\db.sqlite';


thanks and best regards

Posted: Mon 17 Oct 2011 22:03
by FerCastro
Just rename the file?

well, i have changed the 64 bits dll file (from System.Data.SQLite.dll to sqlite3.dll) and my application is already running on 64 bits.

Thanks

Posted: Tue 18 Oct 2011 13:18
by AlexP
Hello,

The UniConnection.Server property is not used for working with SQLite database. One should specify path to the database file in the UniConnection.Database property to connect to the database. Path to the SQLite library should be specified in the ClientLibrary property:

UniConnection1.SpecificOptions.Values['ClienrLibrary']:= 'your_library.dll';

sqlite3.dll is used for win32 and win64 by default. If you want to use your own SQLite library, you should specify it in the ClientLibrary property.

Posted: Wed 19 Oct 2011 19:58
by FerCastro
AlexP wrote:Hello,

The UniConnection.Server property is not used for working with SQLite database. One should specify path to the database file in the UniConnection.Database property to connect to the database. Path to the SQLite library should be specified in the ClientLibrary property:

UniConnection1.SpecificOptions.Values['ClienrLibrary']:= 'your_library.dll';

sqlite3.dll is used for win32 and win64 by default. If you want to use your own SQLite library, you should specify it in the ClientLibrary property.
Well, I will try your code, but with my code is working fine, on 32 bits as well as 64 bits.

Thanks a lot for your help

Posted: Thu 20 Oct 2011 08:36
by AlexP
Hello,

As both libraries (x32 and x64) have the same name (sqlite3.dll) that coincides with the default name of the necessary library, your code works well on both platforms.