all groups > dotnet clr > july 2003 >
You're in the

dotnet clr

group:

Rule for copying between DataRow cells of different types?


Rule for copying between DataRow cells of different types? Bert Hyman
7/30/2003 6:12:20 AM
dotnet clr: If I have a DataRow with a column of type DateTime and another
DataRow with a column of type string and do a simple assignment from
a DateTime cell to a string cell, what should happen?

I ran across this case just yesterday where someone had coded

drA[string-type-cell] = drB[DateTime-type-cell];

When running in our normal us-EN locale, this worked correctly,
producing a properly formatted string representation of the DateTime
object.

However, when run in a de-DE (Germany, German) locale, it did NOT
produce a correctly localized string, instead returning a us-EN
formatted string.

Assigning the DateTime data to an object and then doing a ToString()
did produce a correctly localized string.

If I had the German dotNet runtime installed, would the simple
assignment work correctly?

--
Re: Rule for copying between DataRow cells of different types? Bert Hyman
7/30/2003 9:28:41 AM
bert@visi.com (Bert Hyman) wrote in
news:Xns93C8537F9B16EVeebleFetzer@news.visi.com:

[quoted text, click to view]

Never mind... It seems that there's a lot more going on here than I
knew at first.

--
AddThis Social Bookmark Button