1. Sqlite
- Posted by achury Oct 31, 2015
- 1595 views
Dear Sirs
The Archive has outdated links to eusqlite.
I found a copy at droplink but appaer that dont works with last OEu.
Where is the updated EuSqlite? Is someone working on this wrapper?
2. Re: Sqlite
- Posted by ChrisB (moderator) Nov 01, 2015
- 1523 views
Dear Sirs
The Archive has outdated links to eusqlite.
I found a copy at droplink but appaer that dont works with last OEu.
Where is the updated EuSqlite? Is someone working on this wrapper?
Hi Archury
The new wiki page for eusqlite was going to be http://eusqlite.shoutwiki.com/, then I got distracted, then started to write it onto the euwiki http://openeuphoria.org/wiki/view/eusqlite.wc, but then I got stuck with getting it to work on a 64 bit windows 8 computer, and have been racking my brain cell ever since for a solution, in between re doing the inside of my house, and selling my business (and still working there), so things have got a bit haywire recently.
As my house was essentially being rebuilt from the inside, my computer was put into storage in the garage, so (you've probably guessed by now), I can't actually access the repository just now (it's also backed up onto a hard drive, also safely stored in my garage).
If you wanted a Linux set, I could cobble together it for you in a few minutes, but the windows libraries a safely squirreled away. As soon as my house is back together, I shall put them on line in a few places.
Ok, scrub all that, I put the sqlite library here
https://app.box.com/s/8bhn6iqw5o6a4wx30xhtycvfpohunrqe
You should be able to access it from there. The eusqlite3.ew library is the same for Windows and Linux, but you will need to find your own sqlite3.dll library for Windows - the .so libs for linux are in the above folder. There's also some interesting links and docs in there too.
Theoretically, 32 bit sqlite3.dlls should run on 64 bit windows, using the WoW64 system, but it just doesn't seem to. I have tried a 64 bit sqlite.dll that I forund somewhere, and a 64 bit eu, but no go. If you have any success, please let me know.
Cheers
Chris
3. Re: Sqlite
- Posted by jimcbrown (admin) Nov 02, 2015
- 1460 views
Theoretically, 32 bit sqlite3.dlls should run on 64 bit windows, using the WoW64 system, but it just doesn't seem to. I have tried a 64 bit sqlite.dll that I forund somewhere, and a 64 bit eu, but no go. If you have any success, please let me know.
Cheers
Chris
IIUC that only works with a 32bit eu. It's not possible to use a 32bit dll on a 64bit executable. Unlike the 16/32bit transition, there's no thunking between 32/64bits.
4. Re: Sqlite
- Posted by ChrisB (moderator) Nov 02, 2015
- 1442 views
Hi
Yeah, I know, I couldn't get any combination to work though.
Chris
5. Re: Sqlite
- Posted by jimcbrown (admin) Nov 02, 2015
- 1432 views
Hi
Yeah, I know, I couldn't get any combination to work though.
Chris
Hmm. What happened when you tried 32bit eu + 32bit sqlite dll?
6. Re: Sqlite
- Posted by ChrisB (moderator) Nov 02, 2015
- 1433 views
Hi
Can't remember the details now (and my computer's in the shed), but loaded, and might have had a machine level error when calling one of the functions.
Chris
7. Re: Sqlite
- Posted by ghaberek (admin) Nov 02, 2015
- 1489 views
Can't remember the details now (and my computer's in the shed), but loaded, and might have had a machine level error when calling one of the functions.
Sqlite uses both long long and unsigned long long 64-bit integer types, the latter of which I recently added and I do not believe that change is in the current 4.1.0 BETA release.
So unless you are using the latest source, you will not have the appropriate datatypes available to correctly wrap some of the Sqlite functions. An incorrect attempt could very well lead to machine-level crashes.
Here's an example. sqlite3_last_insert_rowid is a frequently-used function in Sqlite.
-- SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*); constant _sqlite3_last_insert_rowid = define_c_func( sqlite3, "sqlite3_last_insert_rowid", {C_POINTER}, C_LONGLONG ) public function sqlite3_last_insert_rowid( atom s ) return c_func( _sqlite3_last_insert_rowid, {s}) end function
-Greg
8. Re: Sqlite
- Posted by andi49 Nov 02, 2015
- 1395 views
Hi
Can't remember the details now (and my computer's in the shed), but loaded, and might have had a machine level error when calling one of the functions.
Chris
Hi
(working on Windows)
downloaded your files, downloaded the new 32bit sqlite3.dll (3.9.2 32bit) from the homepage.
changed this line 'SQLITE3_WIN_LIB_VER = "sqlite3.dll"'
Changed every 'integer' to 'atom' in 'eusqlite3.ew'
and at least 'sqlite_blob.exw' is not crashing and creates a file called 'test.sql'
(took me about 5 minutes)
integers are a nogo for adresses (like from define_c_func())
i do not know how to use sqlite but it seems you just have to update it to Eu4.0 and get remove the integers(the includes)
(maybe there is much more work)
Andreas
9. Re: Sqlite
- Posted by ChrisB (moderator) Nov 02, 2015
- 1406 views
Hi
That sounds a bit promising.
Will Give it a go, when my home computer emerges from the garage.
Cheers
Chris
10. Re: Sqlite
- Posted by andi49 Nov 02, 2015
- 1406 views
Hi
That sounds a bit promising.
Will Give it a go, when my home computer emerges from the garage.
Cheers
Chris
Before i forget, it only worked with a Eu4.0.(6) not with an Eu4.1(crashed silently)
Andreas