Fix for SQLite's TZUpdateSQL binding bug on v6.6.1 - beta
Posted: 13.05.2007, 07:24
Hello,
Here is a quick fix for a bug in the TZSQLiteStatement.Execute() routine. If an empty SQL string is passed into the function it will raise a cryptic error message:
"library routine called out of sequence"
Replace this:
CheckSQLiteError(FPlainDriver, ErrorCode, ErrorMessage, lcExecute, SQL);
DriverManager.LogMessage(lcExecute, FPlainDriver.GetProtocol, SQL);
try
ErrorCode := FPlainDriver.Step(StmtHandle, ColumnCount,
with this:
CheckSQLiteError(FPlainDriver, ErrorCode, ErrorMessage, lcExecute, SQL);
DriverManager.LogMessage(lcExecute, FPlainDriver.GetProtocol, SQL);
ColumnCount := 0;
if SQL <> '' then
try
ErrorCode := FPlainDriver.Step(StmtHandle, ColumnCount,
... in the referred routine.
Can anyone else please confirm this works ?
Thanks,
Howe
Here is a quick fix for a bug in the TZSQLiteStatement.Execute() routine. If an empty SQL string is passed into the function it will raise a cryptic error message:
"library routine called out of sequence"
Replace this:
CheckSQLiteError(FPlainDriver, ErrorCode, ErrorMessage, lcExecute, SQL);
DriverManager.LogMessage(lcExecute, FPlainDriver.GetProtocol, SQL);
try
ErrorCode := FPlainDriver.Step(StmtHandle, ColumnCount,
with this:
CheckSQLiteError(FPlainDriver, ErrorCode, ErrorMessage, lcExecute, SQL);
DriverManager.LogMessage(lcExecute, FPlainDriver.GetProtocol, SQL);
ColumnCount := 0;
if SQL <> '' then
try
ErrorCode := FPlainDriver.Step(StmtHandle, ColumnCount,
... in the referred routine.
Can anyone else please confirm this works ?
Thanks,
Howe