If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > JDBC DB2 Select with Blob-Field and SCROLL_INSENSITIVE

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-12-06, 13:53
ReneGritsch ReneGritsch is offline
Registered User
 
Join Date: Mar 2006
Posts: 1
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("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.
Reply With Quote
  #2 (permalink)  
Old 03-13-06, 10:15
craigmc craigmc is offline
Registered User
 
Join Date: Aug 2003
Location: austin,tx
Posts: 90
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?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On