im new on Android. I have some trouble with the insert statement in the database, when im running the application the values have not been inserted. Please someone can help.
Change this lines. give the 0 in quotes
you declate KEY_BALANCE as text but you are entering integer value in this field. That's y you are getting error
public long insert_table(String BANKNAME,String TYPE,
String ACCNUM, String BALANCE,
String EXPIRYDATE) {
this.insertStmt.bindString(1, BANKNAME);
this.insertStmt.bindString(2, TYPE);
this.insertStmt.bindString(3, ACCNUM);
this.insertStmt.bindString(4, BALANCE);
this.insertStmt.bindString(5, EXPIRYDATE);
return this.insertStmt.executeInsert();
}
Call this method where you are trying to insert values as
DataHelper dh = new DataHelper(this);
dh.insert_table("Bank Account","","","0","");