You may want to try my 'Lite Wrap' wrapper API:
http://www.sqlite.org/contrib
This takes a single call:
lw_query(sqlite3 *handle, const char *query);
This safely returns a table in memory, without locking SQLite, to which you have random access. As well as some nice utils for displaying table data.
I have had no feedback as to whether anybody likes this wrapper. But I use is exclusively and find it works well for me :) If any person uses this and can suggest enhancements, please let me know.
Regards, Ben.
Brian Swetland wrote:
[jack wu <[EMAIL PROTECTED]>]
documentation says if
int sqlite3_step(sqlite3_stmt*);
returns SQLITE_ROW, (meaning a single row) then i can
use int sqlite3_column_int(sqlite3_stmt*, int iCol);
and other functions to extract the returned values out
of the row.
can i use the same set of API on a result set which
contains multiple rows? if yes, which API do i call to
move to the next row before calling sqlite3_column_*
again?
Just keep calling sqlite3_step() -- it will return SQLITE_ROW
for each row of results (which you can use the sqlite_column_*()
calls to extract data from), SQLITE_DONE if there are no more rows, or an error if something goes wrong.
Brian