1. Sqlite

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?

new topic     » topic index » view message » categorize

2. Re: Sqlite

achury said...

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

new topic     » goto parent     » topic index » view message » categorize

3. Re: Sqlite

ChrisB said...

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.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Sqlite

Hi

Yeah, I know, I couldn't get any combination to work though.

Chris

new topic     » goto parent     » topic index » view message » categorize

5. Re: Sqlite

ChrisB said...

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?

new topic     » goto parent     » topic index » view message » categorize

6. Re: Sqlite

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

new topic     » goto parent     » topic index » view message » categorize

7. Re: Sqlite

ChrisB said...

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

new topic     » goto parent     » topic index » view message » categorize

8. Re: Sqlite

ChrisB said...

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

new topic     » goto parent     » topic index » view message » categorize

9. Re: Sqlite

Hi

That sounds a bit promising.

Will Give it a go, when my home computer emerges from the garage.

Cheers

Chris

new topic     » goto parent     » topic index » view message » categorize

10. Re: Sqlite

ChrisB said...

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu