This actually isn't as AS/400 specific as it seems, because the best you
can do is to check the SQL code and state and try to determine the actual
error and what to do from that. Here's info from the API:
---------------------------
Each SQLException provides several kinds of information:
a string describing the error. This is used as the Java Exception message,
and is available via the getMesage() method
A "SQLstate" string which follows the XOPEN SQLstate conventions. The values
of the SQLState string as described in the XOPEN SQL spec.
An integer error code that is vendor specific. Normally this will be the
actual error code returned by the underlying database.
A chain to a next Exception. This can be used to provided additional error
information
---------------------------
I had difficulty finding a states table, should be able to search on
XOPEN, right? But I did find one at an IBM site, aimed at the AS/400, but
most of it is generic. It is too long to post here and I don't remember the
exact site, but will send you a copy directly.
Joe Sam
-----Original Message-----
From: Jeetandra Mahtani <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Friday, April 16, 1999 10:42 AM
Subject: Validating username and pwd on AS/400
>Hello,
>I am establishing a connection to an AS400 in a
>servlet...>
>try{
> ...}
>catch(SQLException e)
>{
> ...}
>Now, is there any way by which I could let the user
>know whether the username is correct and password is
>wrong or vice-versa?
>
>_________________________________________________________
>DO YOU YAHOO!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>___________________________________________________________________________
>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
>
___________________________________________________________________________
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