On 8/26/05, Cam Crews <[EMAIL PROTECTED]> wrote: > Hi. I'm new to sqlite and would like to use the sqlite C++ API to > return multiple rows from a SELECT statement. I'm able to load a > single row's result into a struct & pass it back by reference through > the callback, but haven't been able to find any resources recommending > a method for returning *multiple* results (rows). Anyone know if > there are sample code/suggestions for getting this to work? I've thus > far seen only rudementry examples of printing results to stdout from > the callback. > > If these resources aren't already out there, I'll consider writing a > tutorial on performing this using a vector of structs... thanks,
If you're using c++ you probably don't want to use the callback for retrieving results. It's difficult to reference members of an instantiated class from a callback. use sqlite_step(). I used stl vectors to store my results. --- The Castles of Dereth Calendar: a tour of the art and architecture of Asheron's Call http://www.lulu.com/content/77264