[cx-oracle-users] Catching ORA-28002 warning
Brought to you by:
atuining
From: Hubert B H. <hhi...@un...> - 2006-04-06 19:14:30
|
I would to catch the warning that comes back from Oracle that tells the user that their password will expire soon. Via JDBC and Java (just as example) it looks something like this: this.conn = DriverManager.getConnection (url, u, p); SQLWarning sqlw = this.conn.getWarnings(); if (sqlw != null ) { System.out.println("verifyPassword warning for " + u + ": " + sqlw.getMessage()); if (sqlw.getErrorCode() == 28002) { /* * This is the password expiration warning that will be passed back to the user */ <do some work here > This doesn't come back as an exception from Oracle, and I can't figure out how to see the warning from cx_Oracle. Catching cx_Oracle.Warning doesn't get catch this warning. Is there a way to catch this warning? Thanks! Hubert Hickman |