症狀
請考慮以下案例:
- 您已安裝適用於 Microsoft SQL Server 2012 或 SQL Server 2014 的 Master Data Services (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
參數名稱:index
位於 System.ThrowHelper.ThrowArgumentOutOfRangeException ()
位於 System.Collections.Generic.List 的1.get_Item (Int32 索引)
位於 System.Collections.ObjectModel.Collection 1.get_Item (Int32 索引)
位於 Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.GetEnumerator ()
在 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 (布林值 clearEntityErrors, 布林值 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 property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation 作業)
位於 System.Windows.DependencyObject.SetValueInternal (DependencyProperty dp, Object value, 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 source, TEventArgs eventArgs)
位於 System.EventHandler.Invoke (Object 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 ()
位於 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 ()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp (MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonUp (Control ctrl, EventArgs e)
在密西西比州。Internal.JoltHelper.FireEvent (IntPtr unmanagedObj、IntPtr unmanagedObjArgs、Int32 argsTypeIndex、Int32 actualArgsTypeIndex、字串 eventName、UInt32 旗標)
案例 2:
按一下第 2 頁上的 [ 新增成員 ] 按鈕,強制 Explorer 新增頁面。 接著,頁面 3 隨即建立,但您收到下列錯誤:
注意
System.ArgumentOutOfRangeException: [ArgumentOutOfRange_Index]
引數:
偵錯資源字串無法使用。 索引鍵和引數通常提供足夠的資訊來診斷問題。 請參閱 http://go.microsoft.com/fwlink/?linkid=106663&version=5.1.20913.00&file=mscorlib.dll&key=ArgumentOutOfRange_Index
參數名稱:index
位於 System.ThrowHelper.ThrowArgumentOutOfRangeException ()
位於 System.Collections.Generic.List 的1.get_Item (Int32 索引)
位於 System.Collections.ObjectModel.Collection 1.get_Item (Int32 索引)
位於 Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.GetEnumerator ()
在 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 source, TEventArgs eventArgs)
位於 System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke (物件傳送者, NotifyCollectionChangedEventArgs e)
位於 Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.CollectionChangedHandler (物件傳送者, NotifyCollectionChangedEventArgs e)
位於 System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke (物件傳送者, NotifyCollectionChangedEventArgs e)
位於 System.Collections.ObjectModel.ObservableCollection'1.OnCollectionChanged (NotifyCollectionChangedEventArgs e)
位於 System.Collections.ObjectModel.ObservableCollection'1.InsertItem (Int32 索引,T 項目)
位於 System.Collections.ObjectModel.Collection'1.Insert (Int32 索引,T 項目)
位於 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 /zh-tw/help/2931693
SQL Server 2012 SP1 的累積更新 9 /en-us/help/2931078
關於 SQL Server 的累積更新
SQL Server 的每個新累積更新都包含所有 Hotfix 和先前累積更新的所有安全性修正程式。 查看 SQL Server 的最新累積更新:
更多資訊
安裝完成後,您必須開啟 Master Data Services 組態管理員,以便升級 MDS 資料庫。
- 按一下 [資料庫],然後按一下 [選取資料庫]。
- 連線到要升級的資料庫。 選取資料庫時,您會收到下列訊息: 此資料庫需要升級。在資料庫升級之前,您無法變更系統設定。
- 按一下 [升級資料庫]。 升級 資料庫精靈 隨即開啟。 請依照精靈中的指示升級資料庫,然後按一下 [完成]。
狀態
Microsoft 已確認這是「適用對象」一節中列出的 Microsoft 產品中的問題。