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 [email protected] ________________________________________ From: [email protected] [[email protected]] on behalf of Drake Wilson [[email protected]] 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 <[email protected]>, 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 [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

