Hi all,

        I am having a problem porting my servlet code from an Access97 Database to
an Oracle8.0.3.0.0 database. It seems that string comparisons somehow do
not work after I ported my code over to the Oracle database. See example
code below:

String password0,password="";

password0=(String)req.getParameter("password");

rs=stmt.executeQuery("SELECT password FROM Customer WHERE CID='"+cid+"'");
rs.next();
password=rs.getString(1);

if (!password0.equals(password)){
        //do some stuff
}

        Basically, I tested the retrieval of the values password and password0 and
they are both the same and correct(database is returning the right value<at
least it looks like it>), but the Strings just do not match. I have tried
trim() to get rid of whitespaces at the ends and it still doesnt work. My
deepest concern is that is it because the Strings returned by the Oracle
database is "changed" in some way or another? This code works in Access97!
Any clues and tips are greatly needed.

Thanks in advance,
Jenn

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to