Page 2 of 2
Posted: 18.06.2013, 12:21
by EgonHugeist
aducom,
It's because sqlite is not suitable for multiconnections afaik.
don't know for sure, but i guess you're right.
It had to do with finalizing the connection.
Finalize the StmtHandle should be sufficent, i think. Still wondering about your issue..
Posted: 19.06.2013, 18:38
by aducom
You are right, and the cause is mine. The errormessage was putting me on the wrong leg. The problem is that my select statement contained a small error in a fieldname. So I would expect a sql syntax error, but i did not get that. So the problem is that it is generating a wrong errormessage. I managed to walk through the code and found a parse error.
Posted: 22.06.2013, 18:16
by EgonHugeist
aducom,
So the problem is that it is generating a wrong errormessage.
Hmm AFAIK SQLite is weak accordingly errorhandling and syntax checks. May i ask if Zeos processes the Exception wrong?
We currently process not all of them:
Code: Select all
{ Return values for sqlite_exec() and sqlite_step() }
SQLITE_OK = 0; // Successful result
SQLITE_ERROR = 1; // SQL error or missing database
SQLITE_INTERNAL = 2; // An internal logic error in SQLite
SQLITE_PERM = 3; // Access permission denied
SQLITE_ABORT = 4; // Callback routine requested an abort
SQLITE_BUSY = 5; // The database file is locked
SQLITE_LOCKED = 6; // A table in the database is locked
SQLITE_NOMEM = 7; // A malloc() failed
SQLITE_READONLY = 8; // Attempt to write a readonly database
_SQLITE_INTERRUPT = 9; // Operation terminated by sqlite_interrupt()
SQLITE_IOERR = 10; // Some kind of disk I/O error occurred
SQLITE_CORRUPT = 11; // The database disk image is malformed
SQLITE_NOTFOUND = 12; // (Internal Only) Table or record not found
SQLITE_FULL = 13; // Insertion failed because database is full
SQLITE_CANTOPEN = 14; // Unable to open the database file
SQLITE_PROTOCOL = 15; // Database lock protocol error
SQLITE_EMPTY = 16; // (Internal Only) Database table is empty
SQLITE_SCHEMA = 17; // The database schema changed
SQLITE_TOOBIG = 18; // Too much data for one row of a table
SQLITE_CONSTRAINT = 19; // Abort due to contraint violation
SQLITE_MISMATCH = 20; // Data type mismatch
SQLITE_MISUSE = 21; // Library used incorrectly
SQLITE_NOLFS = 22; // Uses OS features not supported on host
SQLITE_AUTH = 23; // Authorization denied
SQLITE_FORMAT = 24; // Auxiliary database format error
SQLITE_RANGE = 25; // 2nd parameter to sqlite_bind out of range
SQLITE_NOTADB = 26; // File opened that is not a database file
SQLITE_ROW = 100; // sqlite_step() has another row ready
SQLITE_DONE = 101; // sqlite_step() has finished executing
Do we miss something? Or is it a SQLite leak again?
Posted: 28.06.2013, 19:47
by aducom
I will try to find out. My own components for delphi generates the correct errormessage. The current errormessage was putting me on the wrong leg. But it's because I know a bit about the sqlite dll stuf. It could be that the errormessage is correctly generated, but then overriden somehow. I stepped through the code, but it simply takes a lot of time and haven't been able to figure it out yet. But as everybody, I don't have much time.
Posted: 30.06.2013, 17:13
by EgonHugeist
aducom,
I don't have much time.
me tee. So i hope you can patch this issue..