1

I am trying to make an app that changes certain values of an MS-Access database. I am not trying to add new lines or anything. My problem is that I get a net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::5.0.0-SNAPSHOT attempt to assign to non-updatable column error. The current code I'm using is

    try {
        sql = "SELECT * FROM MtnRoads";

        Connection connection = DriverManager.getConnection("jdbc:ucanaccess://C://Users//anyGenericProgrammer//Documents//Database1.accdb");

        Statement statement = connection.createStatement();
        ResultSet result = statement.executeQuery(sql);
        result.updateString(aNumber, aString);
    } catch (Exception e) {
        errCode.setText(e.toString());
        System.out.println(e);
    }`

I have looked at this StackOverflow question to figure out how to even update the lines in the first place, however the example that is used in extremely confusing. Is there any way to make this work without throwing errors? (I am using javax.swing.JFrame library, errCode is a JLable.)

  • 1
    This might help: [net.ucanaccess.jdbc.UcanaccessSQLException: attempt to assign to non-updatable column](https://stackoverflow.com/questions/28518989/net-ucanaccess-jdbc-ucanaccesssqlexception-attempt-to-assign-to-non-updatable-c) – Rene Feb 25 '20 at 23:57
  • @Rene, the answer for that question is giving me the error `ucanaccess cannot be resolved or is not a field` and `UcanaccessConnection.prepare...`, which I found, is giving me a "cannot make static reference..." error. – anyGenericProgrammer Feb 26 '20 at 23:32

0 Answers0