HighTechTalks DotNet Forums  

DataSet.LocaleNumberFormat Problem

Dotnet Internationalization microsoft.public.dotnet.internationalization


Discuss DataSet.LocaleNumberFormat Problem in the Dotnet Internationalization forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
schaf@2wire.ch
 
Posts: n/a

Default DataSet.LocaleNumberFormat Problem - 10-10-2006 , 01:50 AM






Hi NG !
I run the following code on a Windows XP Professional SP2 and it works
fine...no Problem:

System.Globalization.NumberFormatInfo numberFormatInfo =
System.Threading.Thread.CurrentThread.CurrentUICul ture.NumberFormat.Clone()
as System.Globalization.NumberFormatInfo;
numberFormatInfo.NaNSymbol = "?";
myDataSet.Locale.NumberFormat = numberFormatInfo;

But as soon as I run the same code (compiled) on a Windows XP
Professional SP2 with MUI support (for NLS support) the code crashes at
the line :

myDataSet.Locale.NumberFormat = numberFormatInfo;

Why ? How can it be, that a code runs one time well and one time not ?
Thanks for hints


Reply With Quote
  #2  
Old   
Michael S. Kaplan [MSFT]
 
Posts: n/a

Default Re: DataSet.LocaleNumberFormat Problem - 10-12-2006 , 11:07 AM






And the crash says what exactly?

You should not use NumberFormatInfo based on UICulture, which might be
neutral (in which case there is no NumberFormatInfo in the UICulture to use?


--
MichKa [Microsoft]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure, Fonts, and Tools
Blog: http://blogs.msdn.com/michkap

This posting is provided "AS IS" with
no warranties, and confers no rights.


<schaf (AT) 2wire (DOT) ch> wrote

Quote:
Hi NG !
I run the following code on a Windows XP Professional SP2 and it works
fine...no Problem:

System.Globalization.NumberFormatInfo numberFormatInfo =
System.Threading.Thread.CurrentThread.CurrentUICul ture.NumberFormat.Clone()
as System.Globalization.NumberFormatInfo;
numberFormatInfo.NaNSymbol = "?";
myDataSet.Locale.NumberFormat = numberFormatInfo;

But as soon as I run the same code (compiled) on a Windows XP
Professional SP2 with MUI support (for NLS support) the code crashes at
the line :

myDataSet.Locale.NumberFormat = numberFormatInfo;

Why ? How can it be, that a code runs one time well and one time not ?
Thanks for hints




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.