Skip to content Skip to sidebar Skip to footer

SQLite And Android Insert/Updates On SQLiteDatabase -CompiledStatements-

Pretend I have a table with 2 columns. _id and name. _id is the primary key and I do not want to set this value manually. I want to perform an insert of name='john,' and let the

Solution 1:

Then

    SQLiteStatement statement = db.compileStatement("INSERT INTO "+TABLENAME+" VALUES(null,?);");
    statement.bindString(1,"john");

Should also work.


Post a Comment for "SQLite And Android Insert/Updates On SQLiteDatabase -CompiledStatements-"