eda/SQLite: Fixed problem introduced by 4470ea6d448a85d3a9600948c2e0a41afb59ac4c...
authorJerome St-Louis <jerome@ecere.com>
Sun, 29 Jul 2012 20:10:49 +0000 (16:10 -0400)
committerJerome St-Louis <jerome@ecere.com>
Sun, 29 Jul 2012 20:10:49 +0000 (16:10 -0400)
eda/drivers/sqlite/EDASQLite.ec

index 7be2d25..1695626 100644 (file)
@@ -1496,7 +1496,8 @@ class SQLiteRow : DriverRow
                   dataPtr = (void *) data;
                else
                   dataPtr = &data;
-               ((void (*)())(void *)this.BindData)(this, stmt, (*bindId)++, fld, type, dataPtr, &buffer);
+               ((bool (*)())(void *)this.BindData)(this, stmt, (*bindId)++, fld, type, dataPtr, &buffer);
+               // NOTE: The data is bound twice, for there are 2x '?' in the query from AddCursorWhereClauses
                // Reuse the buffer for Blobs...
                if(fld.sqliteType == SQLITE_BLOB || fld.sqliteType == SQLITE_NULL)
                {
@@ -1504,7 +1505,7 @@ class SQLiteRow : DriverRow
                   delete buffer;
                }
                else
-                  ((void (*)())(void *)this.BindData)(this, stmt, (*bindId)++, fld, type, dataPtr, null);
+                  ((bool (*)())(void *)this.BindData)(this, stmt, (*bindId)++, fld, type, dataPtr, null);
 
                type._vTbl[__ecereVMethodID_class_OnFree](type, dataPtr);
             }