[sqlite] grabbing row contents?

2010-01-22 Thread gary clark

Hiya,

Got a quick question. I perform the following on a table:

select * from table

How do I know when the select has completed all its transactions?

sqlite3_exec(db,query.c_str(),callback, this, db_err);

I'm using the above statement,the callback is getting called as expected.

Thanks,
garyc

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] grabbing row contents?

2010-01-22 Thread Jay A. Kreibich
On Fri, Jan 22, 2010 at 07:57:50AM -0800, gary clark scratched on the wall:
 
 Hiya,
 
 Got a quick question. I perform the following on a table:
 
 select * from table
 
 How do I know when the select has completed all its transactions?
 
 sqlite3_exec(db,query.c_str(),callback, this, db_err);
 
 I'm using the above statement,the callback is getting called as expected.

  The function returns.

   -j

-- 
Jay A. Kreibich  J A Y  @  K R E I B I.C H 

Our opponent is an alien starship packed with atomic bombs.  We have
 a protractor.   I'll go home and see if I can scrounge up a ruler
 and a piece of string.  --from Anathem by Neal Stephenson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] grabbing row contents?

2010-01-22 Thread gary clark
Oh boy. Thanks. 

--- On Fri, 1/22/10, Jay A. Kreibich j...@kreibi.ch wrote:

 From: Jay A. Kreibich j...@kreibi.ch
 Subject: Re: [sqlite] grabbing row contents?
 To: General Discussion of SQLite Database sqlite-users@sqlite.org
 Date: Friday, January 22, 2010, 10:01 AM
 On Fri, Jan 22, 2010 at 07:57:50AM
 -0800, gary clark scratched on the wall:
  
  Hiya,
  
  Got a quick question. I perform the following on a
 table:
  
  select * from table
  
  How do I know when the select has completed all its
 transactions?
  
  sqlite3_exec(db,query.c_str(),callback, this,
 db_err);
  
  I'm using the above statement,the callback is getting
 called as expected.
 
   The function returns.
 
    -j
 
 -- 
 Jay A. Kreibich  J A Y  @  K R E I B I.C H
 
 
 Our opponent is an alien starship packed with atomic
 bombs.  We have
  a protractor.   I'll go home and see if I
 can scrounge up a ruler
  and a piece of string.  --from Anathem by Neal
 Stephenson
 ___
 sqlite-users mailing list
 sqlite-users@sqlite.org
 http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
 

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] grabbing row contents?

2010-01-22 Thread Shane Harrelson
Instead of using sqlite3_exec() and a callback, use sqlite3_prepare_v2() on
your statement and then run it with sqlite3_step() in a loop (there will be
one iteration be row of the result set).  sqlite3_step() will return
something other than SQLITE_ROW when it's done.   When it returns
SQLITE_ROW, you can then use the sqlite3_column_*() apis to look at the
result row.

HTH.
-Shane

On Fri, Jan 22, 2010 at 10:57 AM, gary clark burslem2...@yahoo.com wrote:


 Hiya,

 Got a quick question. I perform the following on a table:

 select * from table

 How do I know when the select has completed all its transactions?

 sqlite3_exec(db,query.c_str(),callback, this, db_err);

 I'm using the above statement,the callback is getting called as expected.

 Thanks,
 garyc

 ___
 sqlite-users mailing list
 sqlite-users@sqlite.org
 http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users