Hi John, Tuesday, March 11, 2008, 11:51:57 AM, you wrote:
JS> Neville Franks wrote: >> Hi John, >> >> Tuesday, March 11, 2008, 10:18:30 AM, you wrote: >> >> JS> Neville Franks wrote: >> >>>>Tuesday, March 11, 2008, 8:48:05 AM, you wrote: >>>> >>>>JAK> On Tue, Mar 11, 2008 at 08:37:27AM +1100, Neville Franks scratched on >>>>the wall: >>>> >>>> >>>>>>If I use sqlite3_get_table() and update/insert/delete one of the tables >>>>>>in the original query, does the results set get updated. ie. If I >>>>>>iterate through the original results from sqlite3_get_table() will I >>>>>>see the changes, or do I need to run the sqlite3_get_table() query >>>>>>anew? >>>>>> >>>>>>If I do see the changes does this also apply to an sqlite3_get_table() >>>>>>query that was on a VIEW? >>>> >>>> >>>>JAK> From <http://www.sqlite.org/c3ref/free_table.html>: >>>> >>>>JAK> The sqlite3_get_table() interface is implemented as a wrapper >>>>around >>>>JAK> sqlite3_exec(). The sqlite3_get_table() routine does not have >>>>access >>>>JAK> to any internal data structures of SQLite. It uses only the public >>>>JAK> interface defined here. As a consequence, errors that occur in the >>>>JAK> wrapper layer outside of the internal sqlite3_exec() call are not >>>>JAK> reflected in subsequent calls to sqlite3_errcode() or >>>>JAK> sqlite3_errmsg(). >>>> >>>>JAK> In other words, "No." You need to run it again. >>>> >>>>JAK> -j >>>> >>>>Jay, >>>>Thanks, I assumed that would be the case. Dynamically updating GUI's >>>>on SQL DB updates appears to be challenging. >>>> >> >> JS> Are you using Windows and the WIN API? If so you can just set up >> JS> callbacks to do it. >> >> I am using C++ and Windows. Do you mean use "triggers"? >> JS> No. If you have the data in some form of windows control like a JS> listview when you get a notify messge telling you it is changed you can JS> fire a callback to perform an Sqlite update. It is a bit tedious to JS> program. It is quite a while since I wrote such a program so I can only JS> give you a big picture. JS> By making the edit phase a transaction you can give the user the option JS> of commiting changes or rolling back. Thanks, but that isn't what I'm trying to do. I'm displaying tree's which are built from SQL queries and I ideally want the tree control to reflect updates to the underlying tables without have to do queries all over again and rebuild the trees from scratch. -- Best regards, Neville Franks, http://www.surfulater.com http://blog.surfulater.com _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users