OCINewPassword and NLS_LANGUAGE [message #471693] |
Mon, 16 August 2010 14:27 |
Kaeluan
Messages: 179 Registered: May 2005 Location: Montreal, Quebec
|
Senior Member |
|
|
Hi,
I am using OCINewPassword in java program to change the password of expired account. Our database NLS_LANGUAGE is set to AMERICAN.
So every time i called my program, error message will be in english.
Ex:
ORA-28003: password verification for the specified password failed
ORA-20004: Password must contain at least one digit and one letter
Is there a way to get those message in French without changing the database NLS_LANGUAGE. Is it possible to change the session NLS_LANGUAGE at runtime when calling OCINewPassword?
Our actual Java code look like this:
DriverManager.registerDriver(new OracleDriver());
// On doit utiliser le driver oci8 car la fonctionnalité n'est pas supporté par la version thin
// Le driver OCI8 supporte la connection avec le TNSNAMES
String url = "jdbc:oracle:oci8:@" + this.database;
Connection conn = null;
// Creation et initialisation des propriétées de la connection
Properties props = new Properties();
props.put("user", this.usager);
props.put("password", this.motDePasse);
props.put("OCINewPassword", nouveauMotDePasse);
// Connexion à la BD
conn = DriverManager.getConnection(url, props);
// Fermeture de la connexion
conn.close();
Any hint appreciated
Thank
|
|
|
Re: OCINewPassword and NLS_LANGUAGE [message #471697 is a reply to message #471693] |
Mon, 16 August 2010 14:40 |
|
Michel Cadot
Messages: 68731 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote:Is there a way to get those message in French without changing the database NLS_LANGUAGE
No, the message language is determined by this parameter.
Quote:Is it possible to change the session NLS_LANGUAGE at runtime when calling OCINewPassword?
As far as I know, no.
But you can try to put NLS_LANGUAGE in the properties.
Regards
Michel
|
|
|