path of Sqlite3.dll

Forum related to SQLite

Moderators: gto, cipto_kh, EgonHugeist

Onis
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 22.04.2010, 03:03
Contact:

path of Sqlite3.dll

Postby Onis » 08.02.2012, 20:04

I know Zeos need the Sqlite3.dll file in the root of the app. I would like to change the path to "C:\My data" or "My Documents", anywhere. How can I do that?

User avatar
EgonHugeist
Zeos Dev Team
Zeos Dev Team
Posts: 1739
Joined: 31.03.2011, 22:38

Postby EgonHugeist » 11.02.2012, 12:10

Onis,

you can also copy this dll to the Windows\system path. If you realy want to have a own folder for this file go to the ZPlainSqLiteDriver.pas and change the WINDOWS_DLL3_LOCATION constant or declare it as global var and change this from your Application...
King regards, Michael

You want to help? viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image

Onis
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 22.04.2010, 03:03
Contact:

Postby Onis » 13.02.2012, 04:35

EgonHugeist,

I went to ZPlainSqLiteDriver.pas and declared the WINDOWS_DLL3_LOCATION as global var. Now from Application I can define the path.

Thank You

marsupilami
Gold Boarder
Gold Boarder
Posts: 671
Joined: 17.01.2011, 14:17

Postby marsupilami » 14.02.2012, 10:46

Hello Onis,

another way might be to load the library yourself before zeos tries to load it. I do that for the firebird client library in some of my programs.
Best regards,

Jan

Onis
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 22.04.2010, 03:03
Contact:

Postby Onis » 14.02.2012, 19:35

Hello Jan,

Do you mean use sqlite3.dll embeded inside App as resource? or add sqlite functions directly in the code?
Best regards,

Onis

marsupilami
Gold Boarder
Gold Boarder
Posts: 671
Joined: 17.01.2011, 14:17

Postby marsupilami » 20.02.2012, 15:13

Hello Onis,

in my programs I do something like this to try to load the firebird client library before zeos tries to do it:

Code: Select all

var
  LibraryHandle: THandle;

procedure preloadLibrary(LibName: String);
begin
  if LibraryHandle <> 0 then FreeLibrary(LibraryHandle);

  if (LibName <> '') and (FileExists(LibName)) then begin
    LibraryHandle := LoadLibrary(PChar(FileName));
  end;
end;

...

  PreloadLibrary("C:\whateverpath\fbclient.dll");


Maybe it is possible to do something like this for SQLite too.

Best regards,

Jan

User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Postby mdaems » 01.03.2012, 02:00

Actually, it would be nice if somebody tried to find out how exactly you can add a new plaindriver object for a specific dll with the new plaindriver model in zeoslib 7.

When we rewrote this code we had the idea it would allow us to provide a feature that actually could create a new driver object based on an existing protocol (eg. sqlite3) but using the driver code with a different dll. But up to now nobody checked what would be needed to do it.

Mark
Image


Return to “SQLite”

Who is online

Users browsing this forum: No registered users and 1 guest