I have looked and maybe I don't know where to look, but here is my situation. I converted a working .mdb database to SQlite using a trial app: ESF Database Migration Toolkit. I migrated all the data with a last autoincremented ID of 263. When I tried to insert any data into the .db using Delphi CE, the autoincrement field didn't work, saying the ID field needed a value. I looked at the table and it had a constraint for the field. I removed the constraint using SQliteUI, redid the ID making it a PRIMARY KEY NOT NULL AUTOINCREMENT and now can add data, but it gives me a negative ID (-3). If I put this in SQLiteUI directly it gives a NULL value until the table is refreshed and I get the correct next ID (264). What could I be doing wrong? Should I have not migrated with data? Remade the table in SQLiteUI? I didn't want to have to manually reenter all that data. Thanks
CREATE TABLE wines (
wineID INTEGER PRIMARY KEY ASC AUTOINCREMENT NOT NULL,
winename VARCHAR (175),
winery VARCHAR (200),
varietal VARCHAR (200),
winetype VARCHAR (150),
incellar INTEGER DEFAULT 0,
vintage VARCHAR (10),
grapes VARCHAR (150),
pricepaid NUMERIC (10, 2) DEFAULT 0,
winelabel BLOB,
wherestored VARCHAR (100),
rating VARCHAR (10),
datepurchased DATETIME,
foodpairing VARCHAR (255),
region VARCHAR (150),
regionalstyle VARCHAR (150),
country VARCHAR (150),
mynotes VARCHAR (255)
)