java - ERROR UPDATING THE SQLITE DATABASE IN ANDROID -
I used this code to update the information in a table named clerk: When I run it, I get an exception, When I use Thank you for your effort and time I found a way to update How is it ... And it worked like miracles :) < Code> try {// update query myDataBase.execSQL ("Update clerk set" + "CLK_NAME = '' + sql_clk_name + '', '+' CLK_EXPIRY_DATE = '' + sql_expirydt + '', '+' CLK_PASSWORD = '' + Sql_password + "'" + "WHERE CLK_ID ='" + sql_clk_id + "'', tap); Toast. Make Text (getApplicationContext (), "Modified !!!", Toast.LnnGHHORT) Show (); } Hold (exception before) {toast. MakeApplicationContext (), "Error Modified Clerk", Toast. LNNGHHORT). Show (); }
ex = null . The record is definitely present in the database.
"myDataBase.execSQL" instead of
"cursor = myDataBase.rawQuery" but the query is not reflected in the database. Helps me
content values = new content value (); Values.put ("CLK_NAME", sql_clk_name); Values.put ("CLK_EXPIRY_DATE", sql_expirydt); Values.put ("CLK_PASSWORD", sql_password); MyDataBase.update ("clerk", values, "CLK_ID = '' sql_clk_id +" '", tap);
Comments
Post a Comment