Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No such table SQLITE_SEQUENCE from AIR/Actionscript

I'm trying to reset the seed for an autoincrement field in SQLITE using AIR/ActionScript/Flex 4.5.

I'm doing what should normally work:

DELETE FROM SQLITE_SEQUENCE WHERE NAME = 'myTable'

I've checked that the database actually contains a SQLITE_SEQUENCE table. I'm able to execute the above statement without errors directly via the Firefox SQLITE plugin (SQLite Manager).

However, when I try to do the same using actionscript, I get an error:

No such table 'SQLITE_SEQUENCE'.

All I could find in searching around was this one guy who posted everywhere he could find - only to be left without an answer: here and here and here

Any ideas?

like image 448
Krishna Avatar asked Aug 27 '11 08:08

Krishna


1 Answers

sqlite_sequence table is not created, until you define at least one autoincrement and primary key column in your schema.

like image 195
bioffe Avatar answered Sep 28 '22 08:09

bioffe