Lazarus
Programming => Operating Systems => Windows CE => Topic started by: vincococka on June 23, 2014, 08:59:29 pm
-
Hi all,
let me share with you following compiled versions of SQLite for Windows CE 5/6 (arm4i).
Download URL:
SQLite 3.9.2 (+ version with AES-128 enc.) (http://itm8.sk/sqlite3ce/3.9.2/)
MD5 checksums:
db83043f404e866dbdf4b9c4554fb6ca sqlite3ce.dll
8b27b589c91fb6eadf8fc5fb9e22098f sqlite3ce-aes.dll
Built with following preprocessor macros:
_UNICODE
UNICODE
NO_TCL
SQLITE_DEFAULT_FOREIGN_KEYS=1
SQLITE_DEFAULT_MMAP_SIZE=2097152
SQLITE_DISABLE_LFS
SQLITE_OMIT_TCL_VARIABLE
SQLITE_OMIT_TRACE
SQLITE_HAS_CODEC
CODEC_TYPE=CODEC_TYPE_AES128
SQLITE_CORE;THREADSAFE=0
SQLITE_THREADSAFE=0
SQLITE_USER_AUTHENTICATION
SQLITE_ENABLE_EXTFUNC
Download URL:
SQLite 3.11.1.0 (with AES-128 encryption & threadsafe=1) (http://itm8.sk/sqlite3ce/)
Built with following preprocessor macros:
_UNICODE;UNICODE;NO_TCL;SQLITE_DEFAULT_FOREIGN_KEYS=1;SQLITE_DEFAULT_MMAP_SIZE=2097152;SQLITE_DISABLE_LFS;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_TRACE;SQLITE_HAS_CODEC;CODEC_TYPE=CODEC_TYPE_AES128;SQLITE_CORE;THREADSAFE=1;SQLITE_THREADSAFE=1;SQLITE_USER_AUTHENTICATION;SQLITE_ENABLE_EXTFUNC
To encrypt database in FreePascal / Lazarus / Delphi you have to first initialize the database with new password via sqlite3_rekey. After encrypting it is enough to use sqlite3_open following with sqlite3_key call...
// Encryption support
//
function sqlite3_key(db: PSQLite3; const pKey: PAnsiChar; nKey: Integer): Integer; cdecl; external 'sqlite3ce-aes.dll';
function sqlite3_rekey(db: PSQLite3; const pKey: PAnsiChar; nKey: Integer): Integer; cdecl; external 'sqlite3ce-aes.dll';
Before opening database it is good to check first 6 bytes of file to compare them with "SQLite" - this means db is unencrypted so you dont have to call sqlite3_key after sqlite3_open.
Examples:
1, opening and encrypting DB file
sqlite3_open('test.db', db);
sqlite3_rekey(db, 'test', Length('test'));
// then use db as usual
2, opening already encrypted DB
sqlite3_open('test.db', db);
sqlite3_key(db, 'test', Length('test'));
// then use db as usual
3, decrypt database file
sqlite3_open('test.db', db);
sqlite3_key(db, 'test', Length('test'));
sqlite3_rekey(db, '', 0); // length 0 will decrypt database file
// then use db as usual
Regards,
Jan
-
Thank You ;)
First test shows positive results.
I'll put it in production very soon.
-
Hi,
I`m glad that it is working for you.
I was in need of having current SQLite for on small project running on WinCE, so I decided to fire up Visual Studio and compile it for myself :).
Just consider that it is compiled with O3 optimization and it was optimized for size (not for speed, because file has 750KB) + with following DEFINES:
SQLITE_ENABLE_COLUMN_METADATA
NO_TCL
SQLITE_OMIT_TRACE
When new version comes out I`ll probably compile it again and put it here somewhere in "clouds" :).
Greets,
Vince
-
This is great !
If you don't mind , it will be very helpful to compile another version with speed optimization, so we can test if there are noticeable differences in performance.
Any way - thx
-
Hi,
I`ve uploaded freshly compiled build that has optimization preference set to speed (not size):
http://www.filedropper.com/sqlite3-385-arm4i-speed
-
Hi all,
I`ve uploaded new version for you.. Enjoy!
Compiled without COLUMN_METADATA and TRACE, optimization preference is for speed (not size).
-
Thx,
Can you explain :
Compiled without COLUMN_METADATA and TRACE...
-
Hi,
I`m really sorry for confusion.
Here are MACROS that I`ve set before compilation of release 3.8.6 (what a significant version :D)
NO_TCL
SQLITE_OMIT_TRACE
SQLITE_DEFAULT_FOREIGN_KEYS=1
V.
-
Hi all,
here we go again with new release of SQLite library 3.8.7:
http://www.filedropper.com/sqlite3ce (http://www.filedropper.com/sqlite3ce)
-
Nice,
Since you put :
SQLITE_DEFAULT_FOREIGN_KEYS=1
sqlite finally take care for foreign keys.
Thx
-
Hi,
yeah, referential integrity is a must.
Btw, does it work as expected?
Regards,
V.
-
Ye it works like it has to be.
-
I've noticed some problems with this version so be careful when you use it.
It has some issue with unfinished transaction so the final result is started but not finished transaction and no access to database.
I'm back on production with 3.8.5 - 3.8.6 and 3.8.7 are on test.
-
Hi all,
for those who are interested I`ve compiled current 3.8.7.1 version of SQLite for WinCE platform..
Enjoy!
-
Nice - but where is the link ?
-
Hi,
link is in the first post... sorry for not mentioning this 8-).
But just in case:
http://www.filedropper.com/sqlite3ce_1 (http://www.filedropper.com/sqlite3ce_1)
-
Hello,
It look like the file is no more available for downloading.
Thanks
-
Hi,
here is new download link:
http://s000.tinyupload.com/index.php?file_id=02472018078786708111
-
nod32 reported a virus
-
sorry for that but seems to be false positive, please check MD5 checksum (made with total commander 8.01):
9afaf80f4f805aecc6d733bb77b8a0c0 *sqlite3ce.dll
Just another mirror:
sqlite3ce.dll (http://wikisend.com/download/450878/sqlite3ce.dll)
-
nod32 reported a virus
FYI: you can use e.g. http://virusscan.jotti.org/en to let multiple virus scanners scan for viruses. Often you do see false positives for some scanners...
-
the second link is ok
the file is ok from the second link
but something is wrong with tinyupload
Edit***@ BigChimp
FYI: you can use e.g. http://virusscan.jotti.org/en to let multiple virus scanners scan for viruses. Often you do see false positives for some scanners...
i prefer virus@total
-
Hello,
if anybody`s interested, I`ve compiled version 3.8.7.2 for Windows CE.
Enjoy!
-
Yes, am I :D
-
Hi,
I`m glad that somebody finds it useful for his work, and the effort put inside was worth of it.
Keep in mind that both versions (3.8.7.1 & 3.8.7.2) were compiled with following DEFINEs:
- UNICODE
- NO_TCL
- SQLITE_DEFAULT_FOREIGN_KEYS=1
- SQLITE_DEFAULT_MMAP_SIZE=2097152
- SQLITE_DISABLE_LFS
- SQLITE_OMIT_TCL_VARIABLE
- SQLITE_OMIT_TRACE
-
I really appreciate your efforts.
I have one question, is SQLITE compile with SQLITE_THREADSAFE=1 (1 is the default value ?)
-
Hi,
only flags that I`ve mentioned in previuos post were used.
Everything else was left in its default value.
Anyway, you can test it with following library call:
https://www.sqlite.org/c3ref/threadsafe.html
-
Hi,
As you can see this thread has been read almost 2000 times, so there are people who are interested for this.
I have tried all the link to download 3.8.7.2 but they are dead or my antivirus block access.
-
Hi all,
here we have new version available:
SQLite 3.8.7.4 for Windows CE : http://www.datafilehost.com/d/2ed275a9
@bambamns: thanks for replying - your post forced me to recompile new version and publish it :).
-
Hi all,
I`ve compiled version 3.8.8.1 of SQLite for WinCE... see first post with details.
Tested with emulator and Trimble Recon device (WinCE6).
-
Hi all,
in first post you can find link to DLL of SQLite 3.8.7.4 compiled with AES/128 encryption.
Library was built from wxSqlite3 3.2.0 codebase (thanks Ullrich - KUDOZ !).
Tested on emulator and 2 real devices ;-).
I hope that you`ll find it usefull.
Regards,
Jan
-
Update to version 3.9.2.
See first post for download links.
Enjoy :-)
-
Hi,
All links are dead - can you mak them alive ?
Thx
-
In case somebody is interested, I`ve recompiled SQLite 3.11.1 with wxSqlite AES 128bit encryption enabled + set THREADSAFE=1. Thanks Ulrich for your great work!
SQLite3ce: http://itm8.sk/sqlite3ce/ (http://itm8.sk/sqlite3ce/)
-
I am sorry if it is already posted.
Is there any sqlite3 dll that is supposed to be faster than others (all compiler optimizations at max & all necessary parameters ON of sqlite)
I am not an sqlite guy, I do not know correct parameters. I am lacking information as to how to compile it for WinCE platform, too. Or else I would gladly do it.
Thanks.
-
Hi ,
sorry for replying so late but I was pretty busy.
I think that there is not any king of magic bullet available for this kind of requirement.
SQLite has lot of compile-time IFDEFs, also Visual C++ compiler offers some nice optimizations (but your library will grow in binary size).
Most of the time engine will spent processing data so you have to think of more about how to properly squeeze maximum performance from engine via queries and think about every one you type. Even best compilers in the world won`t solve developer lazyness.
One example from life: there was a report (data are in Oracle DB 11.2) that was running for 11-12 hours till it finishes. After some SQL queries tuning it`s now finished 3 minutes :).
-
Is there any simple 3.11.1 sqlite dll for wince? Or, this AES128 encryption can open regular sqlite3 databases? Database which created using regular sqlite3. I constantly get "database malformed" or "file is encrypted or is not a database" error messages when I switched using 3.11.1 with aes128 and thread safe version.
-
This 3.11.1 version that I`ve compiled is fully able to operate on encrypted/non-encrypted files.
Please see first post - I`ve written there some hints how to work with encryption.
V.
-
Hi,
Is it possible that we get a new version of DLL compiled for wince, please? If possible a simple DLL with no encryption and another one with encryption is appreciated.
There is some kind of a bug in 3.11.1 DLL version.
1) When I use a code like below:
Transaction.Action := caCommit;
Transaction.Options := [stoUseImplicit];
Transaction.StartTransaction;
[... do some insert/delete/update ...]
Transaction.Commit;
I cannot see changes until a database close/open, or application complete close and start again. On the other hand, same application runs without any problem with version 3.9.2 DLL.
2) I have a database with 4 million records inside. Database size is about 1.3GB. There is no problem opening and using it with 3.9.2 DLL, and 3.11.1 simply says database corrupt, or bad or something like that and cannot even open that database.
Thanks.
-
Hi,
Link on first post is dead - can you make it alive ?
Thx
-
Trying to attach in a message here. Version 3.21.0.0
-
Here is a DLL of sqlite3 version 3.28 compiled for WinCE ARMv4