This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
data is: +55-19-3737-4102 and it is stored in oracle as a varchar2(250) when i pull it out with rs.getString(1) i get -7803 (the result of the math operation) instead of +55-19-3737-4102. i always thought getString() doesn't do any conversions, what is going on? when i view the data in toad, it is +55-19-3737-4102.
Michael Zalewski
Ranch Hand
Joined: Apr 23, 2002
Posts: 168
posted
0
Originally posted by tom walters: data is: +55-19-3737-4102 and it is stored in oracle as a varchar2(250) when i pull it out with rs.getString(1) i get -7803 (the result of the math operation) instead of +55-19-3737-4102. i always thought getString() doesn't do any conversions, what is going on? when i view the data in toad, it is +55-19-3737-4102.
If you do
you get exactly this result. Not because it got converted in getString(). Because it got converted on insert. If you do
you will get the string out. (You are using PreparedStatement to update the database right? If not, you probably should). If you used Statement.execute( String), you probably forgot to put quotes around the +55-19-3737-4102.
tom walters
Ranch Hand
Joined: Feb 14, 2002
Posts: 34
posted
0
it turned out to be a data loading issue, exactly what i am not sure (another team manages the data). the java code was fine and it works now w/ out any changes.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.