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("com.ibm.db2.jcc.DB2Driver").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");
stmt.close();
And here is the resulting exception:
com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -270, SQLSTATE: 42997, SQLERRMC: 63
at com.ibm.db2.jcc.a.rf.e(rf.java:1680)
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.