I'm wanting to reset the auto-increment number in column 'nr' so that it is in sync with the 'rowid' column after a record is deleted.
Below screenshot shows the rowid = 3, but the autoincrement nr = 4 after record 3 was deleted.
I've tried resetting the 'nr' column with this code:
Code: Select all
 openDB
   put "UPDATE sqlite_sequence SET seq = (SELECT MAX(nr) FROM thinkDB)" into tSQL #
   put revdb_querylist(,,gConID,tSQL) into tList
   revExecuteSQL gConID,tSQL
   closeDBbut sadly with no luck!
Grateful for any suggestions or hints!
Thanks,
Glenn

