jeudi 10 décembre 2015

Android bindString not functioning as it should

I am trying to execute an sql statement , but as debug shows the bindString function does nothing and I end up with " INSERT INTO mytable (name1, name2 , name3)(?,?,?);" The code is really simple, what could go wrong

           SQLiteStatement statement = mydb.compileStatement("INSERT INTO mytable (name1, name2 , name3) values (?, ?, ?)");
            statement.clearBindings();
            statement.bindString(1,"one");
            statement.bindString(2,"two");
            statement.bindString(3,"three");
            statement.execute();

Aucun commentaire:

Enregistrer un commentaire