I had thought about that approach and it may be the way I go if the prepare/step functionality does not work for what I need.
However, I only hesitate to do that because I would like to avoid copying the data again to prepare it for transmission to the requestor. Thanks for the insight. Jonathan -- Jonathan R. Haws jh...@sdl.usu.edu ________________________________________ From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Drake Wilson [dr...@begriffli.ch] Sent: Monday, December 06, 2010 16:15 To: General Discussion of SQLite Database Subject: Re: [sqlite] Accessing multiple rows at once via a select statement Quoth Jonathan Haws <jonathan.h...@sdl.usu.edu>, on 2010-12-06 22:51:16 +0000: > 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. This isn't an SQLite problem; it's a C problem. You need to make a C-style closure: function plus pointer to structure of persistent data. Define: struct write_closure { mystructure *next; }; or whatever, then put a struct write_closure on the stack and pass a pointer to that. Then you can mutate the members of the closure structure (in this case, have each callback invocation increment the next-pointer). ---> Drake Wilson _______________________________________________ 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