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}; myDB.execSQL("INSERT INTO " + MY_TABLE + " VALUES (?, ?, ?);", bindArgs); } catch(Exception e) { Log.d("Exception: ", e.getMessage()); } } moreover, i need to extract this newly generated pk value, how can i get that ? regards -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en