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] CallableStatement.getBigDecimal

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-08-04, 12:42
kubak kubak is offline
Registered User
 
Join Date: May 2004
Posts: 4
[JDBC] CallableStatement.getBigDecimal

Hello!

I'm using DB2 8.1. When I'm calling getBigDecimal method in CallableStatement (like:
Code:
  CallableStatement cal = con.prepareCall("{call  TEST_DECIMAL(?)}");
  cal.registerOutParameter(1,Types.DECIMAL,2);
  cal.execute();
  System.out.println(cal.getBigDecimal(1));
)
I'm getting exception:
Code:
java.lang.NumberFormatException: For input string: "8,54"
because DB2 JDBC Driver tries to convert string "8,54" (which is the right value of returned parameter) to BigDecimal, while BigDecimal constructor require that char '.' (not ',') to be coma.

Is there any way to get round this problem?

Kuba Królikowski
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