Page 1 of 1
path of Sqlite3.dll
Posted: 08.02.2012, 20:04
by Onis
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?
Posted: 11.02.2012, 12:10
by EgonHugeist
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...
Posted: 13.02.2012, 04:35
by Onis
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
Posted: 14.02.2012, 10:46
by marsupilami
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
Posted: 14.02.2012, 19:35
by Onis
Hello Jan,
Do you mean use sqlite3.dll embeded inside App as resource? or add sqlite functions directly in the code?
Best regards,
Onis
Posted: 20.02.2012, 15:13
by marsupilami
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
Posted: 01.03.2012, 02:00
by mdaems
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