Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2002
    Posts
    1

    Unanswered: SQLException - Operation must use updateable query

    Hi all,

    I keep getting the exception below when I try to execute an update to a
    table using JDBC-ODBC. I have tried using "Statement.executeUpdate" but keep getting the same exception.

    -->
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
    at sun.jdbc.odbc.JdbcOdbc.createSqlException(JdbcOdbc .java:6026)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java :6183)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java :2489)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute
    (JdbcOdbcStatement.java:329)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate
    (JdbcOdbcStatement.java:279)

    -------------------------------------------------------------------------
    Has anybody got any ideas?

    Please!!!!

    Regards
    Lisa

  2. #2
    Join Date
    Dec 2009
    Location
    Thiruvananthapuram,Kerala,India
    Posts
    1

    Thumbs up And thus 7 years passed so quickly.

    Then on one fine day another child wandered into this lost city in search of the truth.



    Any ways i found the answer for this issue in another site.
    Which is obviously the website of Microsoft itself.
    Here is the URL
    PRB: "Operation Must Use an Updateable Query" Error Message When You Access Excel Through ODBC

    The good news is the root cause of this issue is not in your code and so you don't need to be messing around with your program to solve this.
    (as far as i understand from the article.)
    This is just a file permission issue occuring with ODBC data sources.

    It says ;
    This problem occurs if you try to edit a worksheet that is saved or opened as ReadOnly.

    NOTE: ReadOnly is the default setting for an ODBC connection to Excel, with or without a data source name (DSN). Therefore, the user must always change that setting to edit data.


    So go check for read-only attribute in both your db file and DSN settings to get rid of this exceptional exception .
    My problem was caused by a file lock and now my issue is cleared.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •