"Joanne Pham" <joannekp...@yahoo.com>
wrote in message news:760656.34138...@web90308.mail.mud.yahoo.com
> 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
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to