Re: [sqlite] Database locking Error

2013-08-30 Thread Simon Slavin
On 30 Aug 2013, at 5:36am, techi eth wrote: > Thanks for suggestion. I will take it forward. > > locking will happen with two simultaneous processes accessing for read also? I don't think it can happen if they're both reading. But a process which is reading could block a process which is wri

Re: [sqlite] Database locking Error

2013-08-29 Thread techi eth
Thanks for suggestion. I will take it forward. locking will happen with two simultaneous processes accessing for read also? Thanks On 8/29/13, Simon Slavin wrote: > > On 29 Aug 2013, at 6:48am, techi eth wrote: > >> I am checking for all the function.As of now i am not using sqlite3 time >> o

Re: [sqlite] Database locking Error

2013-08-29 Thread Simon Slavin
On 29 Aug 2013, at 6:48am, techi eth wrote: > I am checking for all the function.As of now i am not using sqlite3 time > out but testing application will take decision accordingly to recall the > operation based on type of error. If you have two simultaneous processes accessing the same databas

Re: [sqlite] Database locking Error

2013-08-28 Thread techi eth
I am checking for all the function.As of now i am not using sqlite3 time out but testing application will take decision accordingly to recall the operation based on type of error. On Wed, Aug 28, 2013 at 3:03 PM, Simon Slavin wrote: > > On 28 Aug 2013, at 9:24am, techi eth wrote: > > > Yes, i

Re: [sqlite] Database locking Error

2013-08-28 Thread Simon Slavin
On 28 Aug 2013, at 9:24am, techi eth wrote: > Yes, i am checking the return code. Just for the function that gives the error, or for the calls before that too ? And are you setting a timeout ? If so, for how long ? Simon. ___ sqlite-users mailing l

Re: [sqlite] Database locking Error

2013-08-28 Thread techi eth
Yes, i am checking the return code. On Tue, Aug 27, 2013 at 5:09 PM, Simon Slavin wrote: > > On 27 Aug 2013, at 5:15am, techi eth wrote: > > > For read operation i am doing _prepare(), _step(), _finalize(). > > For all other operation i am doing _exec(). > > > > Do you see any issue ? > > Noth

Re: [sqlite] Database locking Error

2013-08-27 Thread Simon Slavin
On 27 Aug 2013, at 5:15am, techi eth wrote: > For read operation i am doing _prepare(), _step(), _finalize(). > For all other operation i am doing _exec(). > > Do you see any issue ? Nothing obvious from what I already know apart from the fact that you don't mention setting a timeout:

Re: [sqlite] Database locking Error

2013-08-26 Thread techi eth
For read operation i am doing _prepare(), _step(), _finalize(). For all other operation i am doing _exec(). Do you see any issue ? Cheers - Techi On Mon, Aug 26, 2013 at 9:22 PM, Simon Slavin wrote: > > On 26 Aug 2013, at 9:02am, techi eth wrote: > > > Fun_Read() on TblTest** > > /* Do the p

Re: [sqlite] Database locking Error

2013-08-26 Thread Simon Slavin
On 26 Aug 2013, at 9:02am, techi eth wrote: > Fun_Read() on TblTest** > /* Do the periodic read operation by using db handler return from above*/ How is your read done ? Do you use _exec() like you do for the PRAGMA, or _prepare(), _step(), _finalize(), or _query() or something else ? Simon.

Re: [sqlite] Database locking Error

2013-08-26 Thread Keith Medcalf
> >You only have to do this once, e.g. at database creation. > >Journal mode WAL is a persistent property of the database file. > >Every connection will respect it. > All PRAGMA Option is attached to database as a persistent property? No, only the ones which are persistent. Journal_mode is pers

Re: [sqlite] Database locking Error

2013-08-26 Thread techi eth
Oppps. Apologies for my mistake. My test is working correctly now. Thanks a lot. >You only have to do this once, e.g. at database creation. >Journal mode WAL is a persistent property of the database file. >Every connection will respect it. All PRAGMA Option is attached to database as a pers

Re: [sqlite] Database locking Error

2013-08-26 Thread Kees Nuyt
On Mon, 26 Aug 2013 13:32:42 +0530, techi eth wrote: >PRAGMA jouranl_mode = WAL That's misspelled, both in your text and in your code. Try: PRAGMA journal_mode=WAL; You only have to do this once, e.g. at database creation. Journal mode WAL is a persistent property of the database file. Every

Re: [sqlite] Database locking Error

2013-08-26 Thread techi eth
Thanks. I tried using PRAGMA jouranl_mode = WAL but still it is getting failed for some time. Find below more details. Process 1: Fun_Open() sqlite3_open(DATABASE, &dbUpdate); sqlite3_exec(dbUpdate, " PRAGMA jouranl_mode = WAL", NULL, NULL, &sErrMsg); Fun_Update() on TblTest /* Do the perio

Re: [sqlite] Database locking Error

2013-08-25 Thread Dan Kennedy
On 08/26/2013 01:37 PM, techi eth wrote: Hi, I come across database file locking error while trying below case with Update. Case: One process is updating a Colum periodically & other process is selecting same Colum or other colum in table periodically for read. What is the best way to handle so

[sqlite] Database locking Error

2013-08-25 Thread techi eth
Hi, I come across database file locking error while trying below case with Update. Case: One process is updating a Colum periodically & other process is selecting same Colum or other colum in table periodically for read. What is the best way to handle so that Update will not get locking error? C