![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
On Wednesday, March 05, 2008 4:59 PM GregoryButle wrote: I've got a typed data set with several child tables compiled under 'en-US' as the locale. When the app is run under a different locale (through, e.g., changing regional settings, an MUI, etc.), the following exception occurs: "Failed to load dataset because of the following error: Cannot add a DataRelation or Constraint that has different Locale or CaseSensitive settings between its parent and child tables." This was apparently reported as a VS bug several years ago: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=106466 I tried the "change the UseCurrentLocale attribute to false" suggestion, but to no avail. Ultimately, I had to add the following code to to the Designer.cs file in the InitClass() method after the last table is added but before the first relation is created: this.Locale = System.Threading.Thread.CurrentThread.CurrentCultu re; foreach (System.Data.DataTable dt in base.Tables) { dt.Locale = this.Locale; } This is the only solution that I've found effective, but obviously consider it inadequate since I had to alter generated code. Note that I am using this version 8.0.50727.762 of VS and 2.0 SP1 of .NET. Any feedback would be appreciated. Thanks |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |