Thanks for the clear guide. _busy_timeout is easier to use. By the way, i want confirm that if i am not in an explicit transaction, i can simply redo the _step() invoking, right?
On Tuesday, 7 January 2014, Simon Slavin wrote: > > On 7 Jan 2014, at 8:50am, Woody Wu <[email protected] <javascript:;>> > wrote: > > > Why I cannot just > > sleep for a while > > and redo the sqlite3_step()? > > If you want to sleep for a while then try _step() again you can get the > same result without any programming. Simply set sqlite3_busy_timeout() to > the time you want to sleep: > > <http://www.sqlite.org/c3ref/busy_timeout.html> > > This handles the initial attempt, the error handling, the sleep time, and > the retry, all without any programming on your part. > > Once you have a correct timeout set, then you should treat SQLITE_BUSY the > same way as any other unplanned unrecoverable result code. > > Simon. > _______________________________________________ > sqlite-users mailing list > [email protected] <javascript:;> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Life is the only flaw in an otherwise perfect nonexistence -- Schopenhauer narke public key at http://subkeys.pgp.net:11371 ([email protected]) _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

