> You men to handle the BUSY by waiting for some time and trying to execute
> sqlite3_step?

You can call sqlite3_busy_timeout() with appropriate value after
opening a connection and SQLite will do this waiting for you. Just
remember that explicit transaction that began as read-only and then
transforms into writing can return SQLITE_BUSY anyway and you would
have to rollback it.


Pavel

On Wed, Jul 7, 2010 at 8:36 AM, Lloyd <ll...@cdactvm.in> wrote:
>
> ----- Original Message -----
> From: "Black, Michael (IS)" <michael.bla...@ngc.com>
> To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
> Sent: Wednesday, July 07, 2010 5:35 PM
> Subject: Re: [sqlite] EXTERNAL: sqlite3_step returns sqlite_busy
>
>
> Of course it's possible -- multiple clients accesing the database is just
> fine.
>
> Is there any reason you need exclusive access for each thread in ping-pong
> mode?  If not, just handle the BUSY in both places.
>
> I just want to ensure that the "right data" is read always. And also I want
> it to return the data always. (Even if the database is locked, I am ready to
> wait and open it)
>
> You men to handle the BUSY by waiting for some time and trying to execute
> sqlite3_step?
>
> Thanks a lot,
>  Lloyd
>
>
>
> ______________________________________
> Scanned and protected by Email scanner
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to