On 11/26/07, arbalest06 <[EMAIL PROTECTED]> wrote:

> John Stanton-3 wrote:

> > All you need to do is to test the returned status of your sqlite3_step
> > calls and if you get an error launch an SQL statement "ROLLBACK" and
> > bail out of the transaction.  If there are no errors you complete your
> > transaction with an SQL "COMMIT".

> i think its really a good solution to this problem. However, im required to
> implement the c apis of sqlite..so i need to use the sqlite3_commit_hook and
> sqlite3_rollback_hook..im doing some prototyping to see their
> functionalities but i really cant make it work..and i also cant find some C
> sample source code using these apis..if it is possible, can someone post
> some c code using these apis?..

SQL *is* part of the API of SQLite.  There is no separate C API to
implement transactions; they are part of SQL.  The commit and rollback
hooks are called when someone uses the relevant SQL statements.  They
cannot be used to do what you have described, a transactional batch
insert.

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to