1. Using SQLite with Euphoria 4.x
- Posted by euphoric (admin) Oct 17, 2010
- 1427 views
Forked from Re: Database Battle to the Death
I'm needing a light weight yet robust database
Chris, I can't get your wrapper demos to work on Windows 7 with the 3.3.6 dll you provide at your web site. I wonder if it could be a permissions issue. It tells me, "Install sqlite3.dll, from ..." even though it's already there. I also put the dll in the directory where the demo file resides. Shouldn't it find it right there?
Also, the latest SQLite is 3.7.3. Would it be okay for me to use that version with your wrapper?
Hit me up here or via email... please. :)
2. Re: Using SQLite with Euphoria 4.x
- Posted by ChrisB (moderator) Oct 17, 2010
- 1472 views
Forked from Re: Database Battle to the Death
I'm needing a light weight yet robust database
Chris, I can't get your wrapper demos to work on Windows 7 with the 3.3.6 dll you provide at your web site. I wonder if it could be a permissions issue. It tells me, "Install sqlite3.dll, from ..." even though it's already there. I also put the dll in the directory where the demo file resides. Shouldn't it find it right there?
Also, the latest SQLite is 3.7.3. Would it be okay for me to use that version with your wrapper?
Hit me up here or via email... please. :)
Yes, it should find the sqlite3.dll, both locally, and in the system path. Since I don't use Win 7, I'm not sure I can answer you directly. Also, just replacing the dll supplied at wikispaces with a more current dll should work absolutely fine, if its called sqlite3.dll, you won't need to mod the wrapper.
I'll look into it, in the mean time, try
--************************************************* -- load library and define function calls --************************************************* integer fp fp = open(SQLITE3_WIN_LIB_VER, "r") if fp < 0 then abort(0) end if close(fp)
in the sqlite3 wrapper. Incidentally, you are using the sqlite3 wrapper, and not the sqlite wrapper, which is for sqlite 2.xx aren't you?
Chris
3. Re: Using SQLite with Euphoria 4.x
- Posted by euphoric (admin) Oct 17, 2010
- 1395 views
I'll look into it, in the mean time, try
--************************************************* -- load library and define function calls --************************************************* integer fp fp = open(SQLITE3_WIN_LIB_VER, "r") if fp < 0 then abort(0) end if close(fp)
in the sqlite3 wrapper. Incidentally, you are using the sqlite3 wrapper, and not the sqlite wrapper, which is for sqlite 2.xx aren't you?
Yes, the wrapper is named eusqlite3.ew.
For the code above, it aborts.
Actually, I don't think it's aborting. It just passes through.
I used:
--************************************************* -- load library and define function calls --************************************************* integer fp fp = open(SQLITE3_WIN_LIB_VER, "r") if fp < 0 then ?fp abort(0) end if close(fp)
and fp doesn't print.
4. Re: Using SQLite with Euphoria 4.x
- Posted by ChrisB (moderator) Oct 17, 2010
- 1369 views
Hi
Yes, thats right, it means its finding it, as the file handle is > 0 - if it couldn't find it it would be -1, and it would abort.
That means there is some issue with the sqlite3 dll and windows 7.
Get dependency walker, and open sqlite3.dll, see if there are any unresolved dependencies (this is getting a bit Linuxy, sorry)
Chris
5. Re: Using SQLite with Euphoria 4.x
- Posted by euphoric (admin) Oct 17, 2010
- 1387 views
Get dependency walker, and open sqlite3.dll, see if there are any unresolved dependencies (this is getting a bit Linuxy, sorry)
I check with dependency walker.
Results: I don't know. There were no errors it seems. Just depends on kernel32.dll and msvcrt.dll.
I use FreeBSD, so I'm not skeered of Linuxy. :)
6. Re: Using SQLite with Euphoria 4.x
- Posted by ChrisB (moderator) Oct 19, 2010
- 1265 views
Hi
Solved!
in windows, eusqlite3.ew wrapper is looking for
SQLITE3_WIN_LIB_VER = "sqlite-3.3.6.dll"
whereas the dll installed is sqlite3.dll
so do down, and replace the loading the dll in windows section with
else sqlite3_dll = open_dll(SQLITE3_WIN_LIB_VER) if sqlite3_dll = NULL then --try this sqlite3_dll = open_dll("sqlite3.dll") if sqlite3_dll = NULL then --still! puts(1, "Install sqlite3.dll, from www.sqlite.org, into windows\\system32\n") abort(0) end if end if end if
Just make sure that whatever WIndows dll you use is called sqlite3.dll
I'll update the wikispaces repository with the corrected wrapper. Thanks.
Chris
7. Re: Using SQLite with Euphoria 4.x
- Posted by euphoric (admin) Oct 19, 2010
- 1283 views
Solved!
in windows, eusqlite3.ew wrapper is looking for
SQLITE3_WIN_LIB_VER = "sqlite-3.3.6.dll"
whereas the dll installed is sqlite3.dll
so do down, and replace the loading the dll in windows section with
else sqlite3_dll = open_dll(SQLITE3_WIN_LIB_VER) if sqlite3_dll = NULL then --try this sqlite3_dll = open_dll("sqlite3.dll") if sqlite3_dll = NULL then --still! puts(1, "Install sqlite3.dll, from www.sqlite.org, into windows\\system32\n") abort(0) end if end if end if
Just make sure that whatever WIndows dll you use is called sqlite3.dll
I'll update the wikispaces repository with the corrected wrapper.
I had already made that change (I actually changed the value of SQLITE3_WIN_LIB_VER) and it still didn't work for me. However, adding your code above makes it work now! ::confused::
Now I can get on with it! Thank you! :)