OracleGlobalization.SetThreadInfo() ORA-12705 Error
Posted
by michele
on Stack Overflow
See other posts from Stack Overflow
or by michele
Published on 2010-05-07T14:53:49Z
Indexed on
2010/05/07
14:58 UTC
Read the original article
Hit count: 300
Hi guys! I'm stuck in a problem, i cannot workaround! I have a Oracle client 11, with registry key set to AMERICAN_AMERICA.WE8ISO8859P1. I cannot edit this key, but my application must get data from Oracle in Italian culture format. So I want to edit culture info form my application only. I'm trying to using OracleGlobalization class in ODP.NET library before my Application.Run(), to set culture for my thread:
OracleGlobalization og = OracleGlobalization.GetThreadInfo();
//OracleGlobalization.SetThreadInfo(OracleGlobalization.GetThreadInfo());
og.Calendar = "GREGORIAN";
og.Comparison = "BINARY";
og.Currency = "€";
og.DateFormat = "DD-MON-RR";
og.DateLanguage = "ITALIAN";
og.DualCurrency = "€";
og.ISOCurrency = "ITALY";
og.Language = "ITALIAN";
og.LengthSemantics = "BYTE";
og.NCharConversionException = false;
og.NumericCharacters = ",.";
og.Sort = "WEST_EUROPEAN";
og.Territory = "ITALY";
OracleGlobalization.SetThreadInfo(og);
I get always the same error: ORA-12705: Cannot access NLS data files or invalid environment specified. I really don't know ho to solve this problem! Any hint? I'm working on a Win7 pc with VisualStudio 2008.
Thank you in advance!
© Stack Overflow or respective owner