I use this for autoincreamenting one column ,
"create table info (ID INTEGER PRIMARY KEY AUTOINCREMENT, age int)"
for inserting in table I have this!
public static void databaseInsertInfoTable(int ID,int age){...}
when I want to call databaseInsertInfoTable it does not accept null for ID.
databaseInsertInfoTable(null,12);// this has error!
what value should I insert for ID??
According to the SQLite FAQ, using “null” for your insert should work just fine.
However, if you are using Java, you can’t pass
nullwhere the parameter type is a primitive likeint. You have to use one of Java’s “wrapper classes” to be able to pass a null value, so try puttingIntegerthere instead ofint.