Forums Register Login

problem in fetching data from database

+Pie Number of slices to send: Send
In database it is showing the value of the 3rd column is in decimal form (i.e. 123.45)

String getInfo = "{CALL PKG_TICKET.IF_TINFO" + "(?, ?, ?)}";
gcs_getInfo = (OracleCallableStatement)go_dbConn.prepareCall(getInfo);
System.out.println("The amount in the Database:"+gcs_getInfo.getString(3));

But after executing this code, I got 123,45 in my log file, while it's value is 123.45 in DB.

Is there any problem in code or any conversion problem in database or what???

Plz provide the solution as quick as possible
+Pie Number of slices to send: Send
Try using getLong() or getDouble() instead of getString(). Then you can use a java number formatter to display the number properly.
I didn't do it. You can't prove it. Nobody saw me. The sheep are lying! This tiny ad is my witness!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 973 times.
Similar Threads
idl2java compilation error
Try Ruby! 15 minutes
DATA RETREIVAL _ URGENT
Best Practice and proper syntax
Program like ATM where person enters amount in dollars and cents but program uses int for monies
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 23:22:51.