Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2006

    Unanswered: JDBC DB2 Select with Blob-Field and SCROLL_INSENSITIVE

    I can make an INSERT statement to a table with a BLOB-field in it - but I have a problem to get this BLOB with a SELECT-Statement on a Windows-DB2.

    Here is a sample code:

    Class.forName("").newInst ance();
    Connection conn = DriverManager.getConnection("jdbc:db2://xxx:xxx/xxx", "xxx", "xxx");
    Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE, ResultSet.CONCUR_UPDATABLE);
    stmt.executeQuery("SELECT ID,BLOB(XMLDATA) FROM creator.tablename");

    And here is the resulting exception: DB2 SQL error: SQLCODE: -270, SQLSTATE: 42997, SQLERRMC: 63

    We have the same code working on a Host DB2 (and MS-SQL-Server) without any problems - I think it has something to do with the cursor-settings you can use for creating the statement, but I tried all possibilities for creating a statement, but found no solution without getting other, bigger problems.

  2. #2
    Join Date
    Aug 2003
    SQLSTATE 42997: Capability is not supported by this version of the DB2
    application requester, DB2 application server, or the combination of the two.

    What version of DB2 are you running?

    Can you run that statement directly against the database?

Posting Permissions

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