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 > Type 4 driver - illegal conversion exception

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-06-03, 17:50
makonahalli makonahalli is offline
Registered User
 
Join Date: Sep 2003
Posts: 7
Type 4 driver - illegal conversion exception

I am using DB2 UDB 8.1 on windows 2000

I am using DB2 type 4 driver (com.ibm.db2.jcc.DB2Driver) from the db2jcc.jar library. When I do a setObject on a preparedstatement I get an illegal conversion exception.

The column on which this error occurs is of type char(13) for bit data.

Could someone tell me what I am doing wrong or is this a type 4 driver bug that has been fixed in a newer version.

I did not have this problem when I used type 2 driver from db2java.zip library using COM.ibm.db2.jdbc.net.DB2Driver driver.

Here is my code fragment and the exception.

pstmt = con.prepareStatement(updateStmt.toString());
...
pstmt.setObject(bindIndex, rowStampValue);
...

com.ibm.db2.jcc.b.SQLException: Illegal Conversion
at com.ibm.db2.jcc.b.n.a(n.java:568)
at com.ibm.db2.jcc.b.cf.setString(cf.java:558)
at com.ibm.db2.jcc.b.cf.setObject(cf.java:766)

Thanks in advance.

Manju
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