SQL1.ExecNonQuery2

ciginfo

Well-Known Member
Licensed User
Longtime User
Hello,
Why it does not work?
Code: Copy
SQL1.ExecNonQuery("CREATE TABLE table1 (ID AUTO_INCREMENT PRIMARY KEY, MaDate LONG, MonNom TEXT, MaLongitude DOUBLE, MaLatitude DOUBLE)") 
SQL1.ExecNonQuery2("INSERT INTO table1 VALUES(Null, ?, ?, ?, ?)", Array As Object( now, nomchamp, longi, lati))

In every row ID = 0. ID does not incremented for each record but remains at 0
 
Try the below. It will work for you. It will auto increment for you:
Code: Copy
SQL1.ExecNonQuery("CREATE TABLE table1 (ID INTEGER PRIMARY KEY, MaDate LONG, MonNom TEXT, MaLongitude DOUBLE, MaLatitude DOUBLE)") 
SQL1.ExecNonQuery2("INSERT INTO table1 VALUES(Null, ?, ?, ?, ?)", Array As Object( now, nomchamp, longi, lati))

Bonne journee
 
Upvote 0
Back
Top