Forum > Windows CE

Error running an application using SQLite3 DLL on Windows Embedded systems

(1/2) > >>


I have an application developed with Lazarus. I already have a sqlite3ce.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 "sqlite3ce.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.

P.S. I mistakenly post this question in Widgetset\WinCE forum. Could not delete my post in there. Sorry for double posting.

rename your sqlite3.dll sqlite3ce.dll AS PER THE ERROR MESSAGE!

sqlite3ce.dll.... you say you have sqlite3.dll

You can also adapt the header, but renaming the dll is quicker.

Hi Thaddy,

Sorry for confusing post and providing two different filenames in my post. Actually, that filename is already "sqlite3ce.dll" on the device and in my application code. There is no problem of that. Moreover, in my code, I test if file exists then try to open a database.

Lastly, same code and same DLL works on "Microsoft Windows CE Version 6.0"

P.S. Just fixed double filename problem in my original post.

WINCE 6.0 is from 2006 (at least on my HP PocketPC) and armv3/armv4 only. Maybe R3 has support for more modern arm's That may be the problem. You may try to run on a more modern arm and armv3 is  for sure not a compatible architecture and for armv4 only armv4T is somewhat compatible. So you may need a recompiled dll for your archtecture and ABI. It can also be that your current embedded CE is running on a completely different architecture, like Intel or AVR.

I honestly cannot track which version is released when as naming of WinCE is changing a lot. Below are some screen captures from both devices.

I also think that I may need a new DLL. Problem is I do not know what specifics it should have. Moreover, I do not know how to compile a DLL targeting for WinCE as my current DLL is obtained from this forum.

Device working OK using Samsung Electronics, Cortex A-8-S5PV210 CPU:
Desktop is something like:

Device giving me trouble is using ARM Cortex-A8 OMAP3 CPU:
Desktop is something like:
Start menu is completely different:

P.S. I could not attach 5 files so I am providing links and attachments as many as allowed.


[0] Message Index

[#] Next page

Go to full version