java - ERROR UPDATING THE SQLITE DATABASE IN ANDROID -


itemprop = "text">

I used this code to update the information in a table named clerk:

 < 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 (); }   

When I run it, I get an exception, ex = null . The record is definitely present in the database.

When I use "myDataBase.execSQL" instead of "cursor = myDataBase.rawQuery" but the query is not reflected in the database. Helps me

Thank you for your effort and time I found a way to update

How is it ...

  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);   

And it worked like miracles :)

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -