• 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

JDBC and DB2 Char(n) FOR BIT DATA

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,
I have problem calling a Db2 pl/sql procedure which accepts char(n) for bit data.

Please let know suitable cs.setXXX method and corresponding JDBC datatype. An example is appreciated. Thank you
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
 
john jillella
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Scott Selikoff wrote:Have you tried setString()?



Yes, I tried setString but doesn't work. Thanks.
 
Scott Selikoff
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about setBytes or setCharacterStream? I would just go through the ResultSet API and try the ones related to characters/string. Otherwise check the DB2 JDBC documentation and see if nchar is an unsupported type, although I doubt it's not supported.
 
john jillella
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Scott Selikoff wrote:How about setBytes or setCharacterStream? I would just go through the ResultSet API and try the ones related to characters/string. Otherwise check the DB2 JDBC documentation and see if nchar is an unsupported type, although I doubt it's not supported.



I tried using setBytes. i'll try again tomorrow. In Db2 database it is shown as a binary value.

 
bacon. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic