Categories
android sqlite

Android when insert data doesn’t store into database

I tried to insert data into database SQLLite, but the data doesn’t go into database:

ContentValues cv = new ContentValues();
cv.put("username", cust.getUsername());
cv.put("password", cust.getPassword());
cv.put("name", cust.getCustomername());
long id = mDb.insert("user", null, cv);
Log.v(TAG, Long.toString(id));
Log.e(TAG, "New Customer Created");
return true;

The id returns 5, any idea why? (After few times insert the id return 7 now.)

What other code should I post here? The database connection should be fine since I am able to log-in successfully.