Re: [sqlite] Step Query

2009-03-26 Thread Kees Nuyt
On Wed, 25 Mar 2009 18:47:14 -0600, Dennis Cote wrote: >Kees Nuyt wrote: >> >> This seems a very nice addition to the >> http://www.sqlite.org/cvstrac/wiki?p=SampleCode >> we already have. >> >> I feel tempted to put it in the wiki >> http://www.sqlite.org/cvstrac/wiki

Re: [sqlite] Step Query

2009-03-25 Thread Kees Nuyt
Hi Dennis, On Tue, 24 Mar 2009 18:23:23 -0600, Dennis Cote wrote: >vinod1 wrote: >> I am new to sqlite and C. >> >> I have not been able to write a code which would read row by row using >> sqlite3_step. >> >> Could anybody guide me please. >> >Hi, > >This code is

Re: [sqlite] Step Query

2009-03-24 Thread Dennis Cote
vinod1 wrote: > I am new to sqlite and C. > > I have not been able to write a code which would read row by row using > sqlite3_step. > > Could anybody guide me please. > > Hi, This code is equivalent to the very old callback style code shown at http://www.sqlite.org/quickstart.html. It

Re: [sqlite] Step Query

2009-03-24 Thread vinod1
Hi, I am new to sqlite and C. I have not been able to write a code which would read row by row using sqlite3_step. Could anybody guide me please. Dan Kennedy-4 wrote: > > On Tue, 2007-06-19 at 10:58 +0530, anand chugh wrote: >> Hi >> >> I am having code like this: >> >>rc =

Re: [sqlite] Step Query

2007-06-20 Thread Andrew Finkenstadt
On 6/20/07, Dennis Cote <[EMAIL PROTECTED]> wrote: Andrew Finkenstadt wrote: > > > I ended up writing a (multi-thread aware) C++ framework to keep me > out of trouble. In the SQLite namespace I have Is there any chance that your framework is freely licensed open source so others could use it

Re: [sqlite] Step Query

2007-06-20 Thread Dennis Cote
Andrew Finkenstadt wrote: I ended up writing a (multi-thread aware) C++ framework to keep me out of trouble. In the SQLite namespace I have class exception; class database; class connection; class statement; class execution; class query_result; where the ownership model is

Re: [sqlite] Step Query

2007-06-19 Thread Andrew Finkenstadt
On 6/19/07, Andre du Plessis <[EMAIL PROTECTED]> wrote: I had lots of problems here when starting with SQLite and painstaking I think I've figured it out. Me too. You have sqlite3_prepare, which compiles the sql into byte code, then Sqlite3_step to execute the query or update, if it is an

RE: [sqlite] Step Query

2007-06-19 Thread Andre du Plessis
PROTECTED] On Behalf Of anand chugh Sent: 19 June 2007 07:28 AM To: sqlite-users@sqlite.org Subject: [sqlite] Step Query Hi I am having code like this: rc = sqlite3_prepare(db, zSql, -1, , 0); if( rc!=SQLITE_OK ){ return rc; } sqlite3_bind_text(pStmt, 1, zKey, -1, SQLITE_STATIC

RE: [sqlite] Step Query

2007-06-18 Thread B V, Phanisekhar
> My question here is do I need to do sqlite3_finalize(pStmt); after > every sqlite3_step() to free all memory allocated by > sqlite3_step().Does calling finalize at end will free all memory > allocated by all steps statements? No you don't need to call sqlite3_finalize after every sqlite3_step.

Re: [sqlite] Step Query

2007-06-18 Thread Dan Kennedy
On Tue, 2007-06-19 at 10:58 +0530, anand chugh wrote: > Hi > > I am having code like this: > >rc = sqlite3_prepare(db, zSql, -1, , 0); >if( rc!=SQLITE_OK ){ > return rc; >} >sqlite3_bind_text(pStmt, 1, zKey, -1, SQLITE_STATIC); >sqlite3_bind_blob(pStmt, 2, zBlob, nBlob,

[sqlite] Step Query

2007-06-18 Thread anand chugh
Hi I am having code like this: rc = sqlite3_prepare(db, zSql, -1, , 0); if( rc!=SQLITE_OK ){ return rc; } sqlite3_bind_text(pStmt, 1, zKey, -1, SQLITE_STATIC); sqlite3_bind_blob(pStmt, 2, zBlob, nBlob, SQLITE_STATIC); while( sqlite3_step(pStmt)==SQLITE_ROW ) { *pnBlob =