"Joanne Pham" <[email protected]>
wrote in message news:[email protected]
> I have read the sqlite document and document stated that:
> The SQL command "COMMIT" does not actually commit the changes to
> disk. It just turns autocommit back on.

You omitted the next sentence: "Then, at the conclusion of the command, 
the regular autocommit logic takes over and causes the actual commit to 
disk to occur." For all practical purposes, COMMIT immediately writes to 
disk.

> The question is the default of database open connection is
> "autocommit" and if my function has :
> sqlite3_exec(pDb,"BEGIN;", NULL, 0, &errMsg);
> sqlSt = sqlite3_step(pStmt);
> ..........
> sqlSt = sqlite3_exec(pDb,"END;", NULL, 0, &errMsg);
>
> Then Do I need to sqlSt = sqlite3_exec(pDb,"COMMIT;", NULL, 0,
> &errMsg) to turn on the autocommit again.

COMMIT and END are synonyms - two names for the same command.

Igor Tandetnik



_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to