I'm trying to do an update on a table to a specific row by filtering by id and no long as i try running the query from Java is not saved in the database document.
If I run the query, there's no exceptions and it runs as if it had run successfully, if I do a SELECT to collect the information from Java and see if it has been updated I find that it has been updated correctly, but then if I open the database with MS Access it has not been changed and if I rerun the Java program the changes are not made.
publicbooleanupdateName(intid, Stringname)throwsSQLException {
Connectioncon=db.openConnection();con.setAutoCommit(true);PreparedStatementupdate=con.prepareStatement("UPDATE Mi_Cuenta SET HabboNombre=? WHERE Id=?");update.setString(1, name);update.setInt(2, id);intresult=update.executeUpdate();db.closeConnection(con);if(result==1) {
returntrue;
} else {
returnfalse;
}
}
Edit: Still don't know why is not working, if i make a update in a fresh made MS Access database it actually works.
Seems like the database i'm trying to make the update on its db file version is V2010 [VERSION_14] and the one i've created is 2007 VER 12, i don't know if that helps in any way.
Last edit: Adrian 2020-12-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, i'm going to answer myself, i discover why is not working, in my MS Access table, i have a image row (Ole object) where i have images (bitmap images), i deleted the bitmap images and now it works.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, i'm going to answer myself, i discover why is not working, in my MS
Access table, i have a image row (Ole object) where i have images (bitmap
images), i deleted the bitmap images and now it works.
Nope, i was using the 5.0.0 version as a maven dependency, i'll send you the table unedited that i was trying to update. I speak Spanish and on the database everything will be in Spanish.
Nope, i was using the 5.0.0 version as a maven dependency, i'll send you
the table unedited that i was trying to update. I speak Spanish and on the
database everything will be in Spanish.
I'm trying to do an update on a table to a specific row by filtering by id and no long as i try running the query from Java is not saved in the database document.
If I run the query, there's no exceptions and it runs as if it had run successfully, if I do a SELECT to collect the information from Java and see if it has been updated I find that it has been updated correctly, but then if I open the database with MS Access it has not been changed and if I rerun the Java program the changes are not made.
Database class
Query code
Edit: Still don't know why is not working, if i make a update in a fresh made MS Access database it actually works.
Seems like the database i'm trying to make the update on its db file version is V2010 [VERSION_14] and the one i've created is 2007 VER 12, i don't know if that helps in any way.
Last edit: Adrian 2020-12-11
Ok, i'm going to answer myself, i discover why is not working, in my MS Access table, i have a image row (Ole object) where i have images (bitmap images), i deleted the bitmap images and now it works.
You used a very old UCanAccess version, isn't it?
If not, please help us by sending along a database with an unupdatable
record.
Il Ven 11 Dic 2020, 19:01 Adrian ruman1999@users.sourceforge.net ha
scritto:
Nope, i was using the 5.0.0 version as a maven dependency, i'll send you the table unedited that i was trying to update. I speak Spanish and on the database everything will be in Spanish.
Yes, there are regressions. I'll fix them in the next weeks (during the
holiday)
Il giorno sab 12 dic 2020 alle ore 10:41 Adrian ruman1999@users.sourceforge.net ha scritto: