Re: [sqlite] c-api

2011-07-27 Thread John Deal
Hello Baruch, You may want to look at sqlite3_exec() (http://www.sqlite.org/c3ref/exec.html). John --- On Wed, 7/27/11, Baruch Burstein wrote: > From: Baruch Burstein > Subject: [sqlite] c-api > To: "General Discussion of SQLite Database"

Re: [sqlite] year, month & day problem

2011-07-17 Thread John Deal
Hello, I am new and have received much information from this list so I hope I am not wasting bandwidth. I don't know if it is my misunderstanding or typos but should your sqlite3_column_int() use indexes 0,1 and 2 instead of 1, 12 and 13? If this is the case, according to the docs on

Re: [sqlite] Multi-threading Common Problem

2011-05-24 Thread John Deal
if you will ever want to connect to your database with > sqlite3 > command line tool for example while your application is > running, and > you will do some manipulations with the database, then > your > pthread_rwlock won't work and you will still get > SQLITE_BUSY. And now &

Re: [sqlite] Multi-threading Common Problem

2011-05-24 Thread John Deal
> > Another question is why do you want to get read of > pthread_rwlock if > it works for you? > > > Pavel > > > On Tue, May 24, 2011 at 7:43 AM, John Deal <bassd...@yahoo.com> > wrote: > > Hello Roger, > > > > Sorry to be so

Re: [sqlite] Multi-threading Common Problem

2011-05-24 Thread John Deal
24, 2011, 3:10 AM > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 05/23/2011 09:12 PM, John Deal wrote: > > I guess I am lost on how to obtain a many reader or > one writer mutex in SQLite. > > You are confusing locks on the database and locks in the > li

Re: [sqlite] Multi-threading Common Problem

2011-05-23 Thread John Deal
MESSAGE- > Hash: SHA1 > > On 05/12/2011 01:26 PM, John Deal wrote: > > Good question.  Very possible my understanding is > not complete. > > This document has the full details: > >   http://www.sqlite.org/lockingv3.html > > >I have basically read and wr

Re: [sqlite] Common Multi-treaded Problem

2011-05-13 Thread John Deal
, May 13, 2011, 9:05 PM > > On 14 May 2011, at 12:29am, John Deal wrote: > > > I actually never finalize prepared statements until > the DB is closed and not being used anymore.  I reset > the prepared statements.  For writes (inserts, updates, > etc.) I use explicit t

Re: [sqlite] Common Multi-treaded Problem

2011-05-13 Thread John Deal
But there's one rule of > thumb to > remember: never change data that should be returned in some > active > select statement. You can get very surprising behavior in > this case. > > > Pavel > > > On Thu, May 12, 2011 at 8:33 PM, John Deal <bassd...@yahoo.com>

Re: [sqlite] Common Multi-treaded Problem

2011-05-13 Thread John Deal
> Date: Thursday, May 12, 2011, 9:28 PM > > On 13 May 2011, at 1:33am, John Deal wrote: > > > Humm.  Resetting each prepared statement right > after use seemed to work.  So in review, a select > prepared statement will lock the DB from other threads (or > is it DB co

Re: [sqlite] Multi-threading Common Problem

2011-05-12 Thread John Deal
lite-users@sqlite.org > Date: Thursday, May 12, 2011, 4:01 PM > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 05/12/2011 09:38 AM, John Deal wrote: > > I have been working for weeks on this and I feel there > must be something simple I am overlooking.  > > Why are

Re: [sqlite] Common Multi-treaded Problem

2011-05-12 Thread John Deal
abase. And > transaction cannot be finished (implicitly or explicitly) > until all > statements in this transaction are reset or finalized. > > > Pavel > > > On Thu, May 12, 2011 at 4:01 PM, John Deal <bassd...@yahoo.com> > wrote: > > Hello Igor, > > >

Re: [sqlite] Common Multi-treaded Problem

2011-05-12 Thread John Deal
tion cannot be finished (implicitly or explicitly) > until all > statements in this transaction are reset or finalized. > > > Pavel > > > On Thu, May 12, 2011 at 4:01 PM, John Deal <bassd...@yahoo.com> > wrote: > > Hello Igor, > > > > That ver

Re: [sqlite] Multi-threading Common Problem

2011-05-12 Thread John Deal
> the same process. Nothing uncommitted can be read between > processes or > between different connections in the same process when > shared cache is > turned off. > > > Pavel > > > On Thu, May 12, 2011 at 4:26 PM, John Deal <bassd...@yahoo.com> >

Re: [sqlite] Multi-threading Common Problem

2011-05-12 Thread John Deal
> wrote: > From: Roger Binns <rog...@rogerbinns.com> > Subject: Re: [sqlite] Multi-threading Common Problem > To: sqlite-users@sqlite.org > Date: Thursday, May 12, 2011, 4:01 PM > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 05/12/2011 09:38 AM, John Dea

Re: [sqlite] Common Multi-treaded Problem

2011-05-12 Thread John Deal
PM > On 5/12/2011 12:31 PM, John Deal > wrote: > > When I allow multiple readers with each thread using a > different DB > > connection (open with the same flags) and each thread > having > > exclusive use of its DB connection (no sharing of > connections) and if >

[sqlite] Multi-threading Common Problem

2011-05-12 Thread John Deal
Hello All, I have been using SQLite for a couple of years but have never posted to this list before. I am sure my problem is common and am looking for ideas to solve it. I have used SQLite extensively single-threaded with no problems (other than my own!). I am currently working on another

[sqlite] (no subject)

2011-05-12 Thread John Deal
Hello All, I have been using SQLite for a couple of years but have never posted to this list before. I am sure my problem is common and am looking for ideas to solve it. I have used SQLite extensively single-threaded with no problems (other than my own!). I am currently working on another

[sqlite] Common Multi-treaded Problem

2011-05-12 Thread John Deal
Hello All, I have been using SQLite for a couple of years but have never posted to this list before. I am sure my problem is common and am looking for ideas to solve it. I have basically the same situation as this thread: --- On Wed, Jan 26, 2011 at