Forum > WinCE

Error running an application using SQLite3 DLL on Windows Embedded systems



I have an application developed with Lazarus. I already have a sqlite3.dll v3.9.2 for CE which works just fine under OS "Microsoft Windows CE Version 6.0" for several years.

Now, I have to distribute same application on Windows Embedded Systems. But;
1) CE OS 5.2.29354 device: Intermec CK3R, runs fine for first time after a device boot and then gives me error saying "Can not load SQLite client library "sqlite3.dll", Check your installation.".
2) CE OS 5.2.29040 device: Motorola MC55A, runs fine for first time after a device boot. Then gives same error. Then runs for each second trial followed by an error (Run OK, Error, Run OK, Error, Run OK, Error, ...)

Both devices; if application is run. It runs perfectly. No issues at all.

I have recompiled my own application using below Lazarus and fpc versions
- Lazarus 1.7 compiled with sources from "trunk" revision 53505
- fpc 3.0 compiled with source from "fixes_3_0" revision 33986

I do not know If I need to unload SQLite DLL library by code. or, I need a specific DLL for Windows Embedded systems.

One last thing is, I have below code hack to run PAGMA on SQLite3:

--- Code: ---type
  TSQLite3Connection = class(sqlite3conn.TSQLite3Connection)
    procedure DoInternalConnect; override;


procedure TSQLite3Connection.DoInternalConnect();
  execsql('PRAGMA page_size=4096');
  execsql('PRAGMA journal_mode=MEMORY');
  execsql('PRAGMA temp_store=2');  // MEMORY TEMP STORE
  execsql('PRAGMA locking_mode=EXCLUSIVE');

--- End code ---

I check if file exist and assign client DLL and open SQLite database if file is present. If no file, application displays a message and simply exits.

my debug log contains below lines:

--- Code: ---[FORMS.PP] ExceptionOccurred
  Exception=Can not load SQLite client library "sqlite3ce.dll". Check your installation.
  Stack trace:
TApplication.HandleException Can not load SQLite client library "sqlite3ce.dll". Check your installation.
  Stack trace:

--- End code ---

Any help is appreciated.

Thanks & regards.


[0] Message Index

Go to full version