Trevor Talbot wrote:
Just prepare/step a BEGIN before the loop, and a COMMIT
afterward.
Or even more simply, use sqlite3_exec(). It works very well for
everything except queries.
It already contains all the code to prepare the statement and execute it
using sqlite3_prepare and sqlite3_step. Its well tested, and works. No
sense duplicating this code over and over. Just pass NULL pointers for
all the callback stuff you are not going to use (You may want to get the
error message, but it can always be retrieved later using the
sqlite3_errmsg function).
sqlite3_exec(db, "BEGIN", NULL, NULL, NULL);
for (...) {
}
sqlite3_exec(db, "COMMIT", NULL, NULL, NULL);
HTH
Dennis Cote
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------