If you use rowid correctly (always incrementing rowid by using AUTOINCREMENT) 
you can always query records > lastrowid.  That's probably easier.
http://www.sqlite.org/autoinc.html

So something like:

startrowid = 0;
lastrowid = select max(rowid) from mytable;
select * from mytable where rowid >= startrowid and .........;
startrowid = lastrowid + 1;



Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems

________________________________________
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Paul Vercellotti [pverce...@yahoo.com]
Sent: Thursday, September 13, 2012 2:20 PM
To: sqlite-users@sqlite.org
Subject: EXT :[sqlite] Getting query results as new records are added

Hi there,

I'm wondering if there's a way to get "incremental" results to a query after 
it's started, that includes new records added after the query began?

That is, we've got a UI view that's showing query results, while a background 
task is adding records to the database, some of which may match our query.   
We'd like update the query results view with new records as they're added, 
without having to repeat the whole query and weed out the results we're already 
showing?

Any suggestions are appreciated.

-Paul
_______________________________________________
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

Reply via email to