• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with the JDBC driver.

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Has anyone ever tried sending a BINARY data of about 145k to the database and succeed. I am using JDBC 2.0 Connection pooling and when i try to send a data bigger than 32K i get an CLI0102E Invalid conversion SQLSTATE-07006.
Here is the code i used.Any thoughts.
I register the parameter as
callStmt.registerOutParameter(2, Types.LONGVARBINARY);
//where b is bytes of length 145K
callStmt.setObject(2, b, Types.LONGVARBINARY);

Thanks
Praveen
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you say "the database", what brand database in particular are you speaking of? I've used BLOB's on MySql just fine. What JDBC driver are you using?
 
Praveen Dharmavaram
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use a db2(7.2.10) DB and client. and i get a connection using DB2 Connection pooling (COM.ibm.db2.jdbc.*).
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't have any experience with db2. What are you declaring the database column as? In MySql there's several TEXT and BLOB fields of differing storage capacity.
 
Praveen Dharmavaram
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well..i declare it as a BLOB. This was working when i was using JDBC 1.0 Driver. But when we upgraded to DB2(FP10) and started using the JDBC 2.0 it stopped working and gives the error mentioned earlier.
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, browsing around the DB2 support site I see that this is indeed a defect with DB2, but it looks like there is a fix:
HERE
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I lied. That link just had all the keywords on it. It does not appear to be the error you are reporting. I can't think of anything else. Check out that DB2 support site. Hopefully someone with DB2 experience will see this thread.
 
Praveen Dharmavaram
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the info. I already have a PMR open with IBM in this regard and was wondering if I was the only one facing this problem.
 
reply
    Bookmark Topic Watch Topic
  • New Topic