File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Help regarding comparison of a string value with a String stored in database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Help regarding comparison of a string value with a String stored in database" Watch "Help regarding comparison of a string value with a String stored in database" New topic
Author

Help regarding comparison of a string value with a String stored in database

shobha devi
Greenhorn

Joined: Mar 11, 2009
Posts: 11
I have a table in oracle that contains a string. I retrieve the value and store it in a string variable. Now when i compare the retrieved value with another string using ".equalsIgnoreCase" the result returned is always false.

Can anybody suggest a method to accomplish my requirement
Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 443
    
    1


Hello,

I assume that you must have verified that both the String being compared are the same. You might just want to do a .trim() on the objects to remove any leading or trailing whitespace from them before you do an equals() nor an equalsIgnoreCase().

Cheers,
Raj.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help regarding comparison of a string value with a String stored in database