Chris Gurtler <[EMAIL PROTECTED]> wrote:
Is it possible to do multiple updates of blobs using the bind variables, I was doing them 1 at a time but it was a little slow.For example :- rc = sqlite3_prepare(objects_db, "UPDATE table SET proprietary_data = ? WHERE device_id = ? and instance = ?", -1, &pStmt, 0); for (i= 0; i <10;i++) { sqlite3_bind_blob(pStmt, 1, proprietary_data, proprietary_data_len, SQLITE_STATIC); sqlite3_bind_int(pStmt, 2, object->device_id); sqlite3_bind_int(pStmt, 3, object->objectIdentifier.instance); rc = sqlite3_step(pStmt); } if (sqlite3_finalize(pStmt))
You seem to run the exact same query 10 times, binding the exact same data each time. What is the point of the exercise?
Also, you need to call sqlite3_reset before you rebind parameters and step again. I bet your calls fail in all iterations of the loop except the first.
Igor Tandetnik
----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------

