KB2932340 - 修复:在 SQL Server 2012 或 SQL Server 2014 MDS 中添加成员时出现错误

应用对象
SQL Server 2012 Developer SQL Server 2012 Enterprise SQL Server 2012 Standard SQL Server 2014 Developer - duplicate (do not use) SQL Server 2014 Enterprise - duplicate (do not use) SQL Server 2014 Standard - duplicate (do not use)

症状

请考虑以下情形:

  • 你已安装Master Data Services (适用于 Microsoft SQL Server 2012 或 SQL Server 2014 的 MDS) 。
  • 创建一个实体,它有 100 个成员,并且选中了“自动创建代码值”选项。
  • 在 MDS 资源管理器中,实体有两页成员,其中第 2 页上的成员数等于网格页面大小 (默认值为 50) 。

方案 1:
单击第 1 页上的“ 添加成员 ”按钮,输入添加新成员所需的数据,然后单击“ 下一页 ”按钮。 创建第 3 页后收到以下错误:

注意

System.ArgumentOutOfRangeException: [ArgumentOutOfRange_Index]
参数:
调试资源字符串不可用。 通常,键和参数提供足够的信息来诊断问题。 请参阅 http://go.microsoft.com/fwlink/?linkid=106663&Version=5.1.20913.00&File=mscorlib.dll&Key=ArgumentOutOfRange_Index
参数名称:索引
   在 System.ThrowHelper.ThrowArgumentOutOfRangeException ()
   在 System.Collections.Generic.List 的 Int32 索引) 1.get_Item (
   在 System.Collections.ObjectModel.Collection 的 Int32 索引) 1.get_Item (
   位于 Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.GetEnumerator ()
   at System.Windows.Controls.DataForm.get_ItemsCount ()
   在 System.Windows.Controls.DataForm.SetCanMoveToLastItem ()
   在 System.Windows.Controls.DataForm.SetAllCanProperties ()
   在 System.Windows.Controls.DataForm.SetIsItemValid ()
   在 System.Windows.Controls.DataForm.GenerateUI (Boolean clearEntityErrors, Boolean swapOldAndNew)
   在 System.Windows.Controls.DataForm.OnCurrentItemPropertyChanged (DependencyObject d, DependencyPropertyChangedEventArgs e)
   在 System.Windows.DependencyObject.RaisePropertyChangeNotifications (DependencyProperty dp, Object oldValue, Object newValue)
   在 System.Windows.DependencyObject.UpdateEffectiveValue (DependencyProperty 属性、EffectiveValueEntry oldEntry、EffectiveValueEntry& newEntry、ValueOperation 操作)
   在 System.Windows.DependencyObject.SetValueInternal (DependencyProperty dp, 对象值, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
   位于 System.Windows.Controls.DataForm.UpdateCurrentItem ()
   在 System.Windows.Controls.DataForm。<SetUpCollectionView>b__8 (DataForm 实例、对象源、EventArgs eventArgs)
   在 System.Windows.Controls.WeakEventListener'3.OnEvent (TSource 源, TEventArgs eventArgs)
   在 System.EventHandler.Invoke (对象 sender, EventArgs e)
   位于 Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.OnCurrentChanged ()
   在 Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.MoveCurrentToPosition (Int32 位置)
   在 Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.MoveCurrentTo (对象项)
   位于 Microsoft.MasterDataServices.Client.ViewModel.MasterData.EntityMembersViewModel.set_SelectedItem (成员值)
   位于 Microsoft.MasterDataServices.Client.ViewModel.Common.ItemsBase'2.ReloadItems ()
   at Microsoft.MasterDataServices.Client.ViewModel.MasterData.EntityMembersViewModel.EntityMembers_RefreshNeeded (Object sender, EventArgs e)
   在 Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.Refresh ()
   在 Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.MoveToPage (Int32 pageIndex)
   位于 Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.MoveToNextPage ()
   在 System.Windows.Controls.DataPager.PageMoveHandler (Int32 oldPageIndex、Int32 newPageIndex、PageMoveOperationDelegate pageMoveOperation)
   在 System.Windows.Controls.DataPager.OnNextPageButtonBaseClick (Object sender, RoutedEventArgs e)
   在 System.Windows.Controls.Primitives.ButtonBase.OnClick ()
   在 System.Windows.Controls.Button.OnClick ()
   在 System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp (MouseButtonEventArgs e)
   在 System.Windows.Controls.Control.OnMouseLeftButtonUp (Control ctrl, EventArgs e)
   在 MS。Internal.JoltHelper.FireEvent (IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)

方案 2:
单击第 2 页上的“ 添加成员” 按钮以强制资源管理器添加新页面。 然后创建第 3 页,您收到以下错误:

注意

System.ArgumentOutOfRangeException: [ArgumentOutOfRange_Index]
参数:
调试资源字符串不可用。 通常,键和参数提供足够的信息来诊断问题。 请参阅 http://go.microsoft.com/fwlink/?linkid=106663&Version=5.1.20913.00&File=mscorlib.dll&Key=ArgumentOutOfRange_Index
参数名称:索引
   在 System.ThrowHelper.ThrowArgumentOutOfRangeException ()
   在 System.Collections.Generic.List 的 Int32 索引) 1.get_Item (
   在 System.Collections.ObjectModel.Collection 的 Int32 索引) 1.get_Item (
   位于 Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.GetEnumerator ()
   at System.Windows.Controls.DataForm.get_ItemsCount ()
   在 System.Windows.Controls.DataForm.SetCanMoveToLastItem ()
   在 System.Windows.Controls.DataForm.SetAllCanProperties ()
   在 System.Windows.Controls.DataForm。<SetUpCollectionView>b__a (DataForm 实例、对象源、NotifyCollectionChangedEventArgs eventArgs)
   在 System.Windows.Controls.WeakEventListener'3.OnEvent (TSource 源, TEventArgs eventArgs)
   在 System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke (Object sender, NotifyCollectionChangedEventArgs e)
   at Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.CollectionChangedHandler (Object sender, NotifyCollectionChangedEventArgs e)
   在 System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke (Object sender, NotifyCollectionChangedEventArgs e)
   在 System.Collections.ObjectModel.ObservableCollection'1.OnCollectionChanged (NotifyCollectionChangedEventArgs e)
   在 System.Collections.ObjectModel.ObservableCollection'1.InsertItem (Int32 index, T item)
   在 System.Collections.ObjectModel.Collection'1.Insert (Int32 index, T item)
   在 Microsoft.MasterDataServices.Client.ViewModel.MasterData.EntityMembersViewModel.AddNewMemberToCollection (Guid requestId, EntityMembersGetResponse response, Exception ex)
   在 Microsoft.MasterDataServices.Client.ViewModel.ServiceProxy.ServiceClient。<>c__DisplayClass16'2.<ExecuteRequest>b__15 (Object sender, RequestCompletedEventArgs'1 e)
   在 Microsoft.MasterDataServices.Client.ViewModel.ServiceProxy.ServiceClient.OnEntityMembersGetCompleted (对象状态)

解决方法

此问题已首先在 SQL Server 的以下累积更新中修复。

SQL Server 2014 累积更新 1 /en-us/help/2931693

SQL Server 2012 SP1 的累积更新 9 /en-us/help/2931078

关于 SQL Server 的累积更新

SQL Server 的每个新累积更新都包含上一个累积更新中包含的所有修补程序和所有安全修补程序。 查看 SQL Server 的最新累积更新:

      

详细信息

安装完成后,必须打开 Master Data Services 配置管理器,以便升级 MDS 数据库。

  1. 单击“数据库”,然后单击 “选择数据库”。
  2. 连接到要升级的数据库。 选择数据库后,你会收到以下消息: 此数据库需要升级。在升级数据库之前,无法更改系统设置。
  3. 单击 升级数据库。 此时将打开升级 数据库向导 。 按照向导中的说明升级数据库,然后单击“ 完成”。

状态

Microsoft 已确认在 "适用于" 部分中所列的 Microsoft 产品中存在问题。