• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC and DB2 Char(n) FOR BIT DATA

 
john jillella
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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
 
Scott Selikoff
author
Saloon Keeper
Posts: 4010
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried setString()?
 
john jillella
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scott Selikoff wrote:Have you tried setString()?


Yes, I tried setString but doesn't work. Thanks.
 
Scott Selikoff
author
Saloon Keeper
Posts: 4010
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • 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
  • 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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic