Ricky D Well-Known Member Licensed User Longtime User Sep 13, 2008 #1 I have downloaded the free personal version of SQLite Expert. I have created a field as autoinc in a table. I find that when I do an insert into the table from Basic4PPC the autoinc field doesn't automatically create an entry in the field. I am also trying SQLMaestro and I can edit the field and make it do autoincrement so that it does add data in the field. Has anyone experienced this? regards, Ricky
I have downloaded the free personal version of SQLite Expert. I have created a field as autoinc in a table. I find that when I do an insert into the table from Basic4PPC the autoinc field doesn't automatically create an entry in the field. I am also trying SQLMaestro and I can edit the field and make it do autoincrement so that it does add data in the field. Has anyone experienced this? regards, Ricky
Erel B4X founder Staff member Licensed User Longtime User Sep 13, 2008 #2 I guess that the autoinc field is not a real SQLite INTEGER PRIMARY KEY AUTOINCREMENT field but rather a marking that is used by SQLite Expert. You can add an auto increment field when you create the table: B4X: CREATE TABLE table1 (col1 INTEGER PRIMARY KEY AUTOINCREMENT, col2) See these pages for more information: SQLite Query Language: CREATE TABLE SQLite Autoincrement
I guess that the autoinc field is not a real SQLite INTEGER PRIMARY KEY AUTOINCREMENT field but rather a marking that is used by SQLite Expert. You can add an auto increment field when you create the table: B4X: CREATE TABLE table1 (col1 INTEGER PRIMARY KEY AUTOINCREMENT, col2) See these pages for more information: SQLite Query Language: CREATE TABLE SQLite Autoincrement
Ricky D Well-Known Member Licensed User Longtime User Sep 20, 2008 #3 I figured it out Hi Erel. I got it working by : Creating an Integer field Creating an Index on this field and making it Primary - the Autoincrement checkbox becomes enabled so click it. I tested it and it works like a charm. regards, Ricky
I figured it out Hi Erel. I got it working by : Creating an Integer field Creating an Index on this field and making it Primary - the Autoincrement checkbox becomes enabled so click it. I tested it and it works like a charm. regards, Ricky