Milind Kulkarni wrote:Hi James,
Here is how you can retrieve SQLWarnings -
private static boolean checkForWarning (SQLWarning warn) throws SQLException {
boolean rc = false;
// If a SQLWarning object was given, display the
// warning messages. Note that there could be
// multiple warnings chained together
if (warn != null) {
System.out.println ("\n *** Warning ***\n");
rc = true;
while (warn != null) {System.out.println ("SQLState: " +
warn.getSQLState ());System.out.println ("Message: " +
warn.getMessage ());System.out.println ("Vendor: " +
warn.getErrorCode ());System.out.println ("");
warn = warn.getNextWarning ();}}return rc;
Regards,
Milind
[This message has been edited by Milind Kulkarni (edited July 26, 2000).]
Hi, i am having the same problem right now. I dont open a new
thread for this, because this is already open.
My problem:
I am trying to connect to a SyBase Database named 'pacientesdb' running in an Adaptive Server Anywhere 8, from a
java application. I am using jconnect 6.0, and my connection method (wich can connect to an ASE 9 configured locally for development) is:
But I get the error :
getConnection failed: java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).
I try to change the url to:
- "jdbc:sybase:Tds:192.168.0.101:2368/pacientesdb"
- "jdbc:sybase:Tds:192.168.0.101:2368/pacientesdb?charset=iso_1"
- "jdbc:sybase:Tds:192.168.0.101:2368/?charset=iso_1"
I try with diferent charsets but nothing works.
I need help to solve this.
Hugs,
Juan Manuel