Page 1 of 3

SQLite Broken

Posted: Fri Mar 17, 2006 9:52 pm
by chris319
This code used to work in 3.94:

Code: Select all

dbh = SQLiteOpen("ndx.db")
It now returns the error "Bad parameter type, number expected instead of a string".

Anyone?

Posted: Fri Mar 17, 2006 10:26 pm
by Fangbeast
You are using somebody's wrapper for Sqlite (a third party lib, not pb commands) and PB's syntax has changed a bit between versions so you have to find out who wrote the wrapper and ask them to fix it.

Personally, I never use wrappers because this is what happens and you have no control over it. El_Choni made a warapper but he also wrote some code to directly access the sqlite dll so that we don't have this problem and I am using his code without change on all pb versions.

You might want to see if he, Kiffi or Num3 did the wrapper (More likely Kiffi) and check PureAre.net for an update.

Posted: Fri Mar 17, 2006 11:59 pm
by chris319
You are using somebody's wrapper for Sqlite (a third party lib, not pb commands) and PB's syntax has changed a bit between versions
This is not a syntactical error, but it is El Choni's SQLite interface code. Which El Choni code are you using without modification? Would you mind sharing some examples?

Posted: Sat Mar 18, 2006 12:27 am
by ts-soft
change this

Code: Select all

dbh = SQLiteOpen("ndx.db")
to this:

Code: Select all

dbh = SQLiteOpen(@"ndx.db")
Not tested, but should work

Posted: Sat Mar 18, 2006 10:25 am
by chris319
That fixed it! Thanks!

Posted: Wed Mar 29, 2006 1:30 am
by USCode
Can someone point me to where I could download El_Choni's SQLite3 wrapper?

Posted: Wed Mar 29, 2006 9:08 am
by El_Choni
I don't think such a thing exists.

Posted: Wed Mar 29, 2006 3:15 pm
by dmoc
How would u know! :P

Posted: Wed Mar 29, 2006 4:36 pm
by USCode
El_Choni wrote:I don't think such a thing exists.
I guess you would know! I thought I read you'd written a wrapper but I guess that was just for the previous version of SQLite... thanks anyways.

Posted: Wed Mar 29, 2006 6:04 pm
by El_Choni
I read somewhere that there's a wrapper for Sqlite3 done by Kiffi, but I'm not sure. Mine is for Sqlite2, that's sure.

Posted: Wed Mar 29, 2006 11:19 pm
by Fangbeast
For Kiffi's wrapper, visit purearea.net. He made a wrapper for SQLite3.x and he also contributed it to the PBOSL project.

El_Choni, you are a dead set legend. I am still using your wrapperless code. Works a treat on everything and never breaks between compiler versions. Much betetr than a wrapper (shudders)

Posted: Wed Mar 29, 2006 11:21 pm
by USCode
Fangbeast wrote:...El_Choni, you are a dead set legend. I am still using your wrapperless code. Works a treat on everything and never breaks between compiler versions. Much betetr than a wrapper (shudders)
El_Choni, how about a version then for SQLite3??? Please??? :D

Posted: Wed Mar 29, 2006 11:56 pm
by El_Choni
I suggest that you try Kiffi's' wrapper first... ;) No need to reinvent the wheel. Fangles refers to some code I wrote for sqlite3 without wrappers, using the sqlite functions directly.

Posted: Thu Mar 30, 2006 12:05 am
by USCode
El_Choni wrote:I suggest that you try Kiffi's' wrapper first... ;) No need to reinvent the wheel. Fangles refers to some code I wrote for sqlite3 without wrappers, using the sqlite functions directly.
You mean "sqlite2", right?

Posted: Thu Mar 30, 2006 12:33 am
by Dare2
El_Choni wrote:I don't think such a thing exists.
dmoc wrote:How would u know! :P
:D