[Logo]
Forums Register Login
DB2 JDBC
Is there a data conversion issue with DB2 or Can someone tell me what I'm missing in this code. Even though string(2) is ABC it always prints out "didnt" ???
type = rs.getString(7);
if (type.equals("ABC")) {
out.println("worked");
}
else{
out.println("didnt");
}
Thanks
I did not see any String(2) in your post. Is it just a typo?
you had...
type = rs.getString(7);

Bosun
Yes sorry that's a typo
They both should be string 2
[This message has been edited by Tom Caldwell (edited September 06, 2001).]
[This message has been edited by Tom Caldwell (edited September 06, 2001).]
Never mind
This was a how dumb can I be error
We're all out of roofs. But we still have tiny ads:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA


This thread has been viewed 664 times.

All times above are in ranch (not your local) time.
The current ranch time is
Aug 18, 2018 18:10:44.