On Jan 20, 2011, at 6:25 PM, Terry Bayne wrote: > This works, but often causes an "there are open cursors" error when > closing the connection. > > My naive attempt to solve this doesn't appear to work:
Looks reasonable enough. Are you enumerating all the rows? FWIW, here is what I use: http://dev.alt.textdrive.com/browser/IMDB/DB.lua#L194 E.g.: local aDB = DB( 'sqlite3://localhost/test.db' ) for aContact in aDB( 'select * from contact' ) do print( aContact.name, aContact.email ) end The gist of it is the same: automatically close the cursor upon exhausting it. _______________________________________________ Kepler-Project mailing list Kepler-Project@lists.luaforge.net http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/