views:

54

answers:

0

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!