Objawy
Rozważmy następujący scenariusz:
- Są zainstalowane usługi Master Data Services (MDS) dla programu Microsoft SQL Server 2012 lub SQL Server 2014.
- Tworzysz encję, która ma 100 członków i ma zaznaczoną opcję "Utwórz wartości kodu automatycznie".
- W eksploratorze MDS encja ma dwie strony elementów członkowskich, a liczba elementów na stronie 2 jest równa rozmiarowi strony siatki (domyślnie 50).
Scenariusz 1.
Kliknij przycisk Dodaj członka na stronie 1, wprowadź wymagane dane, aby dodać nowego członka, a następnie kliknij przycisk Następna strona . Zostanie utworzona strona 3 i zostaną wyświetlone następujące błędy:
Uwaga
System.ArgumentOutOfRangeException: [ArgumentOutOfRange_Index]
Argumenty:
Debugowanie ciągów zasobów jest niedostępne. Często klucz i argumenty dostarczają informacji wystarczających do zdiagnozowania problemu. Zobacz http://go.microsoft.com/fwlink/?linkid=106663&Version=5.1.20913.00&File=mscorlib.dll&Key=ArgumentOutOfRange_Index
Nazwa parametru: indeks
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List'1.get_Item(Int32 index)
at System.Collections.ObjectModel.Collection'1.get_Item(Int32 index)
w Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.GetEnumerator()
w System.Windows.Controls.DataForm.get_ItemsCount()
at System.Windows.Controls.DataForm.SetCanMoveToLastItem()
w System.Windows.Controls.DataForm.SetAllCanProperties()
at 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(właściwość DependencyProperty, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, operacja ValueOperation)
at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
at System.Windows.Controls.DataForm.UpdateCurrentItem()
w System.Windows.Controls.DataForm.<SetUpCollectionView>b__8(wystąpienie formularza danych, źródło obiektu, argumenty zdarzeń eventArgs)
at System.Windows.Controls.WeakEventListener'3.OnEvent(TSource source, TEventArgs eventArgs)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.OnCurrentChanged()
at Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.MoveCurrentToPosition(Int32 position)
at Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.MoveCurrentTo(Object item)
at Microsoft.MasterDataServices.Client.ViewModel.MasterData.EntityMembersViewModel.set_SelectedItem(wartość członka)
w Microsoft.MasterDataServices.Client.ViewModel.Common.ItemsBase'2.ReloadItems()
at Microsoft.MasterDataServices.Client.ViewModel.MasterData.EntityMembersViewModel.EntityMembers_RefreshNeeded(Object sender, EventArgs e)
at Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.Refresh()
at Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.MoveToPage(Int32 pageIndex)
w 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)
w System.Windows.Controls.Primitives.ButtonBase.OnClick()
w System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
w MS. Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)
Scenariusz 2.
Kliknij przycisk Dodaj członka na stronie 2, aby wymusić dodanie nowej strony w Eksploratorze. Następnie zostanie utworzona strona 3 i zostaną wyświetlone następujące błędy:
Uwaga
System.ArgumentOutOfRangeException: [ArgumentOutOfRange_Index]
Argumenty:
Debugowanie ciągów zasobów jest niedostępne. Często klucz i argumenty dostarczają informacji wystarczających do zdiagnozowania problemu. Zobacz http://go.microsoft.com/fwlink/?linkid=106663&Version=5.1.20913.00&File=mscorlib.dll&Key=ArgumentOutOfRange_Index
Nazwa parametru: indeks
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List'1.get_Item(Int32 index)
at System.Collections.ObjectModel.Collection'1.get_Item(Int32 index)
w Microsoft.MasterDataServices.Client.ViewModel.Common.SortablePagedCollectionView'1.GetEnumerator()
w System.Windows.Controls.DataForm.get_ItemsCount()
at System.Windows.Controls.DataForm.SetCanMoveToLastItem()
w System.Windows.Controls.DataForm.SetAllCanProperties()
w System.Windows.Controls.DataForm.<SetUpCollectionView>b__a(wystąpienie DataForm, źródło obiektu, NotifyCollectionChangedEventArgs eventArgs)
at System.Windows.Controls.WeakEventListener'3.OnEvent(TSource source, TEventArgs eventArgs)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at 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(indeks Int32, element T)
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)
w Microsoft.MasterDataServices.Client.ViewModel.ServiceProxy.ServiceClient.<>c__DisplayClass16'2.<ExecuteRequest>b__15(Object sender, RequestCompletedEventArgs'1 e)
at Microsoft.MasterDataServices.Client.ViewModel.ServiceProxy.ServiceClient.OnEntityMembersGetCompleted(Object state)
Rozwiązanie
Ten problem został po raz pierwszy rozwiązany w następującej aktualizacji zbiorczej programu SQL Server.
Aktualizacja zbiorcza 1 dla systemu SQL Server 2014 /pl-pl/pomoc/2931693
Aktualizacja skumulowana 9 dla SQL Server 2012 z dodatkiem Service Pack 1 /en-us/help/2931078
Informacje o aktualizacjach zbiorczych dla programu SQL Server
Każda nowa aktualizacja zbiorcza programu SQL Server zawiera wszystkie poprawki zabezpieczeń uwzględnione w poprzedniej aktualizacji skumulowanej. Sprawdź najnowsze aktualizacje zbiorcze dla programu SQL Server:
- Najnowsza aktualizacja zbiorcza dla programu SQL Server 2014
- Najnowsza aktualizacja zbiorcza dla programu SQL Server 2012 z dodatkiem SP1
Więcej informacji
Po zakończeniu instalacji należy otworzyć program Menedżer konfiguracji usług Master Data Services, aby zaktualizować bazę danych MDS.
- Kliknij pozycję Bazy danych, a następnie kliknij przycisk Wybierz bazę danych.
- Połącz się z bazą danych, którą chcesz uaktualnić. Po wybraniu bazy danych zostanie wyświetlony następujący komunikat: Ta baza danych wymaga uaktualnienia. Nie można zmienić ustawień systemowych, dopóki baza danych nie zostanie uaktualniona.
- Kliknij przycisk Uaktualnij bazę danych. Zostanie otwarty Kreator uaktualniania bazy danych . Postępuj zgodnie z instrukcjami kreatora, aby uaktualnić bazę danych, a następnie kliknij przycisk Zakończ.
Stan
Firma Microsoft potwierdziła, że jest to problem dotyczący produktów firmy Microsoft wymienionych w sekcji „Dotyczy”.