I am trying to update my local sqlite table. My executeUpdate()
returns 1 but does not update. I couldnt add full runnable code because it needs to work with local database.
This is codeblock where I update table.
protected int notGuncelle(int gelenId, String yeniNot) {
int update = -1;
try {
update = st.executeUpdate("UPDATE notlar SET 'not' = " + "'yeniNot'" + " WHERE id = " + gelenId);
System.out.println(update);
} catch (SQLException ex) {
//Logger.getLogger(SQLiteFunctions.class.getName()).log(Level.SEVERE, null, ex);
System.out.println("Not güncelleme hatası: " + ex.getLocalizedMessage());
}
return update;
}
Aucun commentaire:
Enregistrer un commentaire