I have a problem entering usuario
and password
, by console it throws the following:
table users have 3 columns but 2 values were supplied
and in the emulator the app stops, the table was created with two fields and an id auto increment, use android studio, attached code
public void onCreate(SQLiteDatabase db) {
db.execSQL("create table usuarios(codigo integer primary key autoincrement, usuario text, contrasena text)");
db.execSQL("insert into usuarios values('admin', 'admin')");
}
@Override
public void onUpgrade(SQLiteDatabase db, int versionVieja, int versionNueva)
{
db.execSQL("create table usuarios(codigo integer primary key autoincrement, usuario text, contrasena text)");
db.execSQL("insert into usuarios values('admin', 'admin')");
}