[sqlite] transaction in one thread and other thread also trying to write data

2014-05-13 Thread d b
Hi all, My application is multithreaded. It maintains only connection per application. Database accessed by single process only. ThreadA will do database write operations(bulk) in a transaction. ThreadB will do single write operation without transaction but same connection pointer. Here,

Re: [sqlite] sqlite suddenly thrown error

2014-03-31 Thread d b
te3_step( m_insert_stmt ); if(!reset_once) { reset_once = true; sqlite3_reset( m_insert_stmt ); } return r; } On Mon, Mar 31, 2014 at 3:52 PM, d b <va230...@gmail.com> wrote: > >>You might have f

Re: [sqlite] sqlite suddenly thrown error

2014-03-31 Thread d b
4 at 3:33 PM, d b <va230...@gmail.com> wrote: > My application calls sqlite3_finalize() after insertion of 10,000 > record(loop). Is there any other reason? > > > On Mon, Mar 31, 2014 at 3:23 PM, d b <va230...@gmail.com> wrote: > >> sqlite3_bind_text() returned 2

Re: [sqlite] sqlite suddenly thrown error

2014-03-31 Thread d b
My application calls sqlite3_finalize() after insertion of 10,000 record(loop). Is there any other reason? On Mon, Mar 31, 2014 at 3:23 PM, d b <va230...@gmail.com> wrote: > sqlite3_bind_text() returned 21 error. It is throwing for all insertions > once error introduced. >

Re: [sqlite] sqlite suddenly thrown error

2014-03-31 Thread d b
restart the application only. On Mon, Mar 31, 2014 at 2:23 PM, d b <va230...@gmail.com> wrote: > Hi, > > I am getting sqlite error 21. > > > There is only one sqlite prepared statement for insertion. It's not > multi threaded app. The below function repeatedl

[sqlite] sqlite suddenly thrown error

2014-03-31 Thread d b
Hi, I am getting sqlite error 21. There is only one sqlite prepared statement for insertion. It's not multi threaded app. The below function repeatedly calling for every record insertion. This app was running from last 4 days. On third, it was started throwing error 21. What could be the

[sqlite] check constraint

2014-02-25 Thread d b
Hi, I would like to add check constraint for existing database. Is it possible? for ex: create table emp(id integer primary key autoincrement, fullname,fathername,mothername as text); insert into emp(fullname,fathername,mothername) values("a","b","c"); insert into

[sqlite] crashed

2014-01-26 Thread d b
Hi all, crashed at winShmBarrier from sqlite free/sqlite mutex leave/sqlite page apis. application using database extensively on windows that time. any idea? Thanks, d b ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi

Re: [sqlite] sqlite error

2014-01-21 Thread d b
I didn't set any timeout value. It was fine with delete/insert/update/select queries. Suddenly, started giving sqlite error with error code 1. On Tue, Jan 21, 2014 at 9:03 AM, d b <va230...@gmail.com> wrote: > Hi all, > > sqlite throws error code 1 while sqlite busy

[sqlite] sqlite error

2014-01-20 Thread d b
Hi all, sqlite throws error code 1 while sqlite busy with read/write operations. what could be the reason. But, I could not reproduce this with test program. what is the best way to handle sqlite error. Is it like sqlite abort case? Thanks, d b

Re: [sqlite] sqlite abort

2014-01-17 Thread d b
Thank you. What is the default time? what is the ideal time for sqlite? On Fri, Jan 17, 2014 at 6:53 PM, d b <va230...@gmail.com> wrote: > Hi all, > > When database busy with read/write operations, it's thrown sqlite abort > error while delete a record. > > what d

[sqlite] sqlite abort

2014-01-17 Thread d b
Hi all, When database busy with read/write operations, it's thrown sqlite abort error while delete a record. what does it mean sqlite abort(Callback routine requested an abort)? Shouldn't application delete when database busy with read/write operations? Thanks, a v

[sqlite] prepared statemnt for column names and sorting preference

2013-12-05 Thread d b
Hi, select * from emp order by empid desc; //here empid is column name among clolumns. Now, I want to write prepared statement for above query. select * from emp order by ? ?; //I want to substitute column name and sorting preference. is it possible with sqlite? thanks, a

Re: [sqlite] query optimization

2013-11-19 Thread d b
Thanks alot RSmith. On Mon, Nov 18, 2013 at 6:04 PM, d b <va230...@gmail.com> wrote: > Hi Igor/Keith, > > I tried with both queries. I expect to delete all rows belongs to key 1. > But not deleted. Am I missing something while writing queries? > > delete from emp

Re: [sqlite] query optimization

2013-11-18 Thread d b
'); -- On Mon, Nov 18, 2013 at 5:20 PM, d b <va230...@gmail.com> wrote: > Thanks RSmith. > > It works. > > But, I am looking for single query for prepared statements. That's the > actual struggle for me. > > > On Mon, No

Re: [sqlite] query optimization

2013-11-18 Thread d b
Thanks RSmith. It works. But, I am looking for single query for prepared statements. That's the actual struggle for me. On Mon, Nov 18, 2013 at 4:24 PM, d b <va230...@gmail.com> wrote: > Hi RSmith, > > Thanks. Still, I could not delete with single query. > > > create

Re: [sqlite] query optimization

2013-11-18 Thread d b
ring query = ???; if(name.length() > 0) { //needs to delete specific row. by unique key. } else { //needs to delete rows belongs to key } } On Mon, Nov 18, 2013 at 2:13 PM, d b <va230...@gmail.com> wrote: > Hi Luis, &g

Re: [sqlite] query optimization

2013-11-18 Thread d b
Hi Luis, Those are parameters. This is the query after replacing with ?1 and ?2. delete from emp where key = '123' and (case when name = 'abc' is null THEN 1 else name = 'abc' end); It covered "delete from emp where key = '123' and name = 'abc';" but not other query. I tried with "select

[sqlite] query optimization

2013-11-17 Thread d b
Hi, I am trying to make single query instead of below two queries. Can somebody help? 1. delete from emp where key = '123'; 2. delete from emp where key = '123' and name = 'abc'; if Key available, execute 1st query. if key and name available, execute 2nd query. Is it possible to write in

[sqlite] store image file as blob

2013-10-30 Thread d b
Hi, My sqlite database module has to store images (max. 100 KB) on client machine. 1. store images on file system and have reference in database 2. store image as blob in database. Which is the best way to store these images? Any suggestions are welcome. Best Regards, va.