You can keep the prepared SQl and re-use it by using sqlite3_reset.
Rob Richardson wrote:
Igor,
Thank you very much for your reply. My naïve impression was that sqlite3_prepare/step/finalize are used for SELECT statements, where there would be a result set one would want to step through, and that one would use sqlite3_exec() for statements where no result set is expected, such as UPDATE, DELETE or INSERT.
So, let's say we want to delete a record using "DELETE FROM my_table WHERE my_key =
my_unwanted_value". I would just pass that string into sqlite3_prepare16(), then
call sqlite3_step() to actually do the deletion (and return SQLITE_DONE), and then clean
up by calling sqlite_finalize?
Rob Richardson
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------