I am having some troubles figuring out how I can access multiple rows in a 
table..

For example, I have a table that I am trying to "SELECT * FROM some_table;".  
For each row in the table, my callback function is called.

What I need to do is have the callback write the data in the rows into 
successive memory locations.

For example, I have a structure:

typedef struct
{
    int one;
    int two;
    int three;
} my_structure;
my_structure mine[10];

My table is created like this:

"CREATE TABLE some_table (key INTEGER PRIMARY KEY, one INTEGER, two INTEGER, 
three INTEGER);"

After inserting 10 rows into the table, I would like to read them out into the 
"mine" array declared.

As an argument to the callback, I pass the address of the array.  However, I 
cannot change that address and have it persist through to the next call for the 
next row.

I'm sure someone has worked through this before, however my searches on Google 
and Gmane have not been fruitful at all.

Can anyone shed some light on the subject for me?  This is my last major hurdle 
in getting this embedded database up and running!

Thanks,

Jonathan

--
Jonathan R. Haws
jh...@sdl.usu.edu

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

Reply via email to