Triệu chứng
Hãy cân nhắc các trường hợp sau:
- Bạn đã cài đặt Dịch vụ Dữ liệu Chính (MDS) cho Microsoft SQL Server 2012 hoặc SQL Server 2014.
- Bạn tạo một thực thể có 100 thành viên và đã chọn tùy chọn "Tự động tạo giá trị mã".
- Trong MDS Explorer, thực thể có hai trang gồm các thành viên với số lượng thành viên trên Trang 2 bằng với kích cỡ trang lưới (mặc định là 50).
Kịch bản 1:
Bấm vào nút Thêm Thành viên trên Trang 1, nhập dữ liệu bắt buộc để thêm thành viên mới, rồi bấm vào nút Trang Tiếp theo . Trang 3 được tạo và bạn gặp phải các lỗi sau:
Lưu ý
System.ArgumentOutOfRangeException: [ArgumentOutOfRange_Index]
Đối số:
Chuỗi tài nguyên gỡ lỗi không khả dụng. Thường thì khóa và đối số cung cấp đủ thông tin để chẩn đoán sự cố. Xem http://go.microsoft.com/fwlink/?linkid=106663&version=5.1.20913.00&file=mscorlib.dll&key=ArgumentOutOfRange_Index
Tên tham số: chỉ mục
tại System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List'1.get_Item(Int32 index)
at System.Collections.ObjectModel.Collection'1.get_Item(Int32 index)
tại Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.GetEnumerator()
tại System.Windows.Controls.DataForm.get_ItemsCount()
tại System.Windows.Controls.DataForm.SetCanMoveToLastItem()
tại System.Windows.Controls.DataForm.SetAllCanProperties()
tại System.Windows.Controls.DataForm.SetIsItemValid()
at System.Windows.Controls.DataForm.GenerateUI(Boolean clearEntityErrors, Boolean swapOldAndNew)
at System.Windows.Controls.DataForm.OnCurrentItemPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
tại System.Windows.Controls.DataForm.UpdateCurrentItem()
tại System.Windows.Controls.DataForm.<SetUpCollectionView>b__8(phiên bản Biểu mẫu dữ liệu, nguồn đối tượng, EventArgs eventArgs)
at System.Windows.Controls.WeakEventListener'3.OnEvent(TSource source, TEventArgs eventArgs)
at System.EventHandler.Invoke(Object sender, EventArgs e)
tại Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.OnCurrentChanged()
tại Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.MoveCurrentToPosition(Int32 position)
tại Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.MoveCurrentTo(Object item)
ở Microsoft.MasterDataServices.Client.ViewModel.MasterData.EntityMembersViewModel.set_SelectedItem(Giá trị thành viên)
tại Microsoft.MasterDataServices.Client.ViewModel.Common.ItemsBase'2.ReloadItems()
at Microsoft.MasterDataServices.Client.ViewModel.MasterData.EntityMembersViewModel.EntityMembers_RefreshNeeded(Object sender, EventArgs e)
tại Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.Refresh()
at Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.MoveToPage(Int32 pageIndex)
tại Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.MoveToNextPage()
at System.Windows.Controls.DataPager.PageMoveHandler(Int32 oldPageIndex, Int32 newPageIndex, PageMoveOperationDelegate, pageMoveOperation)
at System.Windows.Controls.DataPager.OnNextPageButtonBaseClick(Object sender, RoutedEventArgs e)
tại System.Windows.Controls.Primitives.ButtonBase.OnClick()
tại System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
tại MS. Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)
Kịch bản 2:
Bấm vào nút Thêm Thành viên trên Trang 2 để buộc Explorer thêm trang mới. Sau đó, Trang 3 được tạo và bạn nhận được các lỗi sau:
Lưu ý
System.ArgumentOutOfRangeException: [ArgumentOutOfRange_Index]
Đối số:
Chuỗi tài nguyên gỡ lỗi không khả dụng. Thường thì khóa và đối số cung cấp đủ thông tin để chẩn đoán sự cố. Xem http://go.microsoft.com/fwlink/?linkid=106663&version=5.1.20913.00&file=mscorlib.dll&key=ArgumentOutOfRange_Index
Tên tham số: chỉ mục
tại System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List'1.get_Item(Int32 index)
at System.Collections.ObjectModel.Collection'1.get_Item(Int32 index)
tại Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.GetEnumerator()
tại System.Windows.Controls.DataForm.get_ItemsCount()
tại System.Windows.Controls.DataForm.SetCanMoveToLastItem()
tại System.Windows.Controls.DataForm.SetAllCanProperties()
tại System.Windows.Controls.DataForm.<SetUpCollectionView>b__a(phiên bản DataForm, nguồn đối tượng, NotifyCollectionChangedEventArgs eventArgs)
at System.Windows.Controls.WeakEventListener'3.OnEvent(TSource source, TEventArgs eventArgs)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
tại Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.CollectionChangedHandler(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection'1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection'1.InsertItem(Int32 index, T item)
at System.Collections.ObjectModel.Collection'1.Insert(Int32 index, T item)
at Microsoft.MasterDataServices.Client.ViewModel.MasterData.EntityMembersViewModel.AddNewMemberToCollection(Guid requestId, EntityMembersGetResponse response, Exception ex)
tại Microsoft.MasterDataServices.Client.ViewModel.ServiceProxy.ServiceClient.<>c__DisplayClass16'2.<ExecuteRequest>b__15(Object sender, RequestCompletedEventArgs'1 e)
tại Microsoft.MasterDataServices.Client.ViewModel.ServiceProxy.ServiceClient.OnEntityMembersGetCompleted(Object state)
Giải pháp
Sự cố này được khắc phục lần đầu tiên trong bản cập nhật tích lũy tiếp theo của SQL Server.
Cập nhật tích lũy 1 cho SQL Server 2014 /en-us/help/2931693
Cập nhật tích lũy 9 cho SQL Server 2012 SP1 /en-us/help/2931078
Giới thiệu về các bản cập nhật tích lũy cho SQL Server
Mỗi bản cập nhật tích lũy mới dành cho SQL Server chứa tất cả các bản sửa lỗi nóng và bản sửa lỗi bảo mật được tích hợp trong bản cập nhật tích lũy trước đó. Xem các bản cập nhật tích lũy mới nhất cho SQL Server:
- Bản cập nhật tích lũy mới nhất cho SQL Server 2014
- Bản cập nhật tích lũy mới nhất cho SQL Server 2012 SP1
Xem thêm thông tin
Sau khi cài đặt xong, bạn phải mở Trình quản lý Cấu hình Dịch vụ Dữ liệu Chính để có thể nâng cấp cơ sở dữ liệu MDS.
- Bấm Cơ sở dữ liệu, rồi bấm Chọn Cơ sở dữ liệu.
- Kết nối với cơ sở dữ liệu mà bạn muốn nâng cấp. Khi chọn cơ sở dữ liệu, bạn sẽ nhận được thông báo sau: Cơ sở dữ liệu này yêu cầu nâng cấp. Bạn không thể thay đổi cài đặt hệ thống cho đến khi cơ sở dữ liệu được nâng cấp.
- Bấm Nâng cấp Cơ sở dữ liệu. Trình hướng dẫn Nâng cấp Cơ sở dữ liệu sẽ mở ra. Làm theo hướng dẫn trong trình hướng dẫn để nâng cấp cơ sở dữ liệu, rồi bấm Kết thúc.
Trạng thái
Microsoft đã xác nhận rằng đây là sự cố trong các sản phẩm của Microsoft được liệt kê trong mục "áp dụng cho".