Home » Developer & Programmer » Precompilers, OCI & OCCI » OCINewPassword and NLS_LANGUAGE (10g R2)
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
|
|
|
|
Goto Forum:
Current Time: Sun May 04 05:32:08 CDT 2025
|