[yunqa.de] Re: SQLite - Execute SQL with retry

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Wed, 13 May 2015 16:58:22 +0200

On 13.05.2015 11:43, Tobias Rapp wrote:

Are there any side-effects of re-executing a SQL statement like INSERT,
UPDATE or DELETE after sqlite3_exec returns SQLITE_LOCKED (like some
triggers executed twice, etc)?

No. SQLite is atomic: It executes SQL statements to completion or not at all.

In your case, SQLITE_LOCKED indicates that sqlite3_step() did not succeed and no changes have been written. So in order to achieve your goal you have no other choice but to re-execute the statement when the database is no longer locked.

Ralf
_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: