ERROR UPDATING THE SQLITE DATABASE IN ANDROID

ali123456

New Member
I have to update the details in a table named CLERK, using this code:\[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 + "'" , null); Toast.makeText(getApplicationContext(), "MODIFIED !!!", Toast.LENGTH_SHORT).show();}catch (Exception ex){ Toast.makeText(getApplicationContext(), "error modifying clerk",Toast.LENGTH_SHORT).show();}\[/code\]When I run it, I get an exception, \[code\]ex=null\[/code\]. The record is definitely present in the db.When I use \[code\]"cursor = myDataBase.rawQuery"\[/code\] instead of \[code\]"myDataBase.execSQL"\[/code\] the query execute but not reflected in the database.. someone help me out please
 
Back
Top