i am doing sqlite3
my tables's pk is auto-increment. What shpuld i pass its value while
inserting so that auto increment executes properly ?
public void writeRecord(Row rec) {
try {
Object[] bindArgs = new Object[] {-1, rec.name, rec.email};
Hi,
You don't need to pass anything.
Try to use myDB.insert instead of myDB.execSQL, for instance:
ContentValues values = new ContentValues();
values.put(field1, value_for_field1);
values.put(field2, value_for_field2);
myDB.insert(MY_TABLE, null, values);
Realize that you do not need to inform
2 matches
Mail list logo