Hi Trevor, I have an application to writh to database with begin transaction and end transaction. Before end transaction another application try to connect to the database to read the data and in the middle of the read of the second application the first application isues the end transaction. Because the read is still reading the data the first application return an error message that "Couldn't end the transaction ..." ( I don't remember the exactly error message) but the first application couldn't "end the transaction" becuase the read of the second application.
So What you said is if the second application is connected to the database while the first application is writing then the error message SQLITE_BUSY is return back to application and not connect to the the database right. Thanks, JP ----- Original Message ---- From: Trevor Talbot <[EMAIL PROTECTED]> To: sqlite-users@sqlite.org Sent: Friday, November 9, 2007 1:43:26 PM Subject: Re: [sqlite] Read and write in SQLite On 11/9/07, Joanne Pham <[EMAIL PROTECTED]> wrote: > I knew that SQLite doesn't allow concurrency for both read and write at the > same time. > My application is written in C++ so Is there any way that we can check if > there is any connection to the database so the second connection needs to > wait. For example my application write to the database and other application > is reading data from database so both read and write need to check if there > is any connection to the database before making the connection to the > database. I'm not clear on what problem you're trying to solve. If SQLite cannot do something now it will return SQLITE_BUSY from most calls. What other behavior do you need? ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] ----------------------------------------------------------------------------- __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com