On Nov 3, 2008, at 8:04 AM, Paul Clarke wrote:

> Is it really correct that in order to perform an INSERT, Sqlite  
> demands
> that no other connections be active?
>
> It uses the same database instance but (obviously) separate statements
> for each operation
>

Please distinguish between a "connection" and a "statement".  A  
"connection" is what you get back from sqlite3_open().  A "statement"  
is what you get back from sqlite3_prepare_v2().

You can INSERT while a query is pending on the same connection.  You  
cannot INSERT while a query is pending on the same database file but  
using a different connection.  Within a single program there is rarely  
a need to have multiple connections so this is seldom an issue.


>
>
> When the insert is attempted, SQLITE_BUSY is  returned
>
>
>
> Waiting is obviously no use because the conflicting operation is in  
> the
> outer loop
>
>
>
> Is this expected or am I doing something silly?
>
>
>
> Thanks
>
>
>
> Paul Clarke
>
>
> *********************************************************************
>
> Notice:  This email is confidential and may contain copyright  
> material of Ocado Limited (the "Company"). Opinions and views  
> expressed in this message may not necessarily reflect the opinions  
> and views of the Company.
> If you are not the intended recipient, please notify us immediately  
> and delete all copies of this message. Please note that it is your  
> responsibility to scan this message for viruses.
> Please do not print this email unless necessary.
>
> *********************************************************************
>
>
> Ocado Limited
>
> Titan Court
> 3 Bishops Square
> Hatfield Business Park
> Hatfield
> Herts
> AL10 9NE
> Tel: +44 (0) 1707 228000
> Fax: +44 (0) 1707 227999
> www.ocado.com
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

D. Richard Hipp
[EMAIL PROTECTED]



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

Reply via email to