Database Error Messages ???

Hi,
Does anyone know the difference between these 2 error messages:

Error 0 - Unable to Prepare Statement:
Error 1 - Unable to Prepare Statement:

Would be nice if a member of technical staff could point out the difference, or is there a list somewhere of Xojo® error messages?
Thanks in advance.

Maybe just a syntax error?

It would of course help to know what database you have.

if you look at this test code, you will see that Prepare command gives correct error about missing table while prepare than give no good error.

[code] dim db as new SQLiteDatabase

call db.Connect

db.SQLExecute “select * from test where r = 1”

if db.Error then
MsgBox "SQLExecute: "+db.ErrorMessage
end if

dim p as PreparedSQLStatement = db.Prepare(“select * from test where r = ?”)

if db.Error then
MsgBox "Prepare: "+db.ErrorMessage
end if

p.Bind(0, 1)
p.BindType(0, SQLitePreparedStatement.SQLITE_INTEGER)

p.SQLExecute

if db.Error then
MsgBox "Prepared SQLExecute: "+db.ErrorMessage
end if

[/code]

I’m using SQLite, and was hoping there was some kind of error message list somewhere, which detailed exactly what each error message meant.

Telling the user Error 0 - Unable to Prepare Statement: seems a bit pointless really, as it does not actually indicate what the error is, and leaves you guessing.

you have to check for the error details after the prepare, not after the SQLSelect.

So basically, 2 error checks - 1 after the prepare, and another after p.SQLExecute (or p.SQLSelect).
I usually only do one - after the p.SQLExecute.

yes