SQLite, Delphi XE2 Win64

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
FerCastro
Posts: 47
Joined: Mon 26 Jun 2006 17:32
Location: México City
Contact:

SQLite, Delphi XE2 Win64

Post by FerCastro » Mon 17 Oct 2011 21:21

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

FerCastro
Posts: 47
Joined: Mon 26 Jun 2006 17:32
Location: México City
Contact:

Post by FerCastro » Mon 17 Oct 2011 22:03

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

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Tue 18 Oct 2011 13:18

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.

FerCastro
Posts: 47
Joined: Mon 26 Jun 2006 17:32
Location: México City
Contact:

Post by FerCastro » Wed 19 Oct 2011 19:58

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

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Thu 20 Oct 2011 08:36

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.

Post Reply