On Tue, May 10, 2011 at 10:09 AM, Lynton Grice <lynton.gr...@logosworld.com>wrote:
> So in my mind I am thinking that perhaps I can LIMIT the size of the > SQLIte DB to say 5 MB? And once the DB reaches that size it starts > INSERTING new logs over the earliest records in the database? > > Is this possible? The API doesn't provide a way to do this, but i have done the following in the past... keep a counter in the log function, and every (say) 100 calls, run a DELETE to clean up what you want. In my case i simply got the ID of the last-inserted log entry and ran DELETE ... WHERE ID<(the_last_id-100). Not a perfect solution, but for simple apps it suffices. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users