Hi,
I have a delete stored procedure that deletes records from multiple tables. There could be up to a few thousand records in a couple of those tables and a few hundred in a couple others.
Unfortunately this is timing out. See the exception information below. Is there a way for me to increase the timeout period for this operation?
System.Data.SqlClient.SqlException was unhandled by user code
HResult=-2146232060
Message=Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Source=.Net SqlClient Data Provider
ErrorCode=-2146232060
Class=11
LineNumber=0
Number=-2
Procedure=""
Server=QOSMIO\SQL2012
State=0
StackTrace:
at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable)
at OakLeaf.MM.Main.Data.mmDataAccessSql.SaveDataSet(DataSet ds, String tableName, String primaryKeyName, Boolean retrieveAutoIncrementPK, IDbDataAdapter dbAdapter)
at OakLeaf.MM.Main.Business.mmBusinessObject.DeleteRow(DataRow dr)
at OakLeaf.MM.Main.Business.mmBusinessObjectGeneric`1.DeleteRow(DataRow dr)
at OakLeaf.MM.Main.Business.mmBusinessObjectGeneric`1.DeleteEntity(EntityType entity)
at OakLeaf.MM.Main.Business.mmBusinessObjectGeneric`1.DeleteEntity(mmBusinessEntity entity)
at OakLeaf.MM.Main.WPF.mmBusinessUIHelper.DeleteEntity(ImmBusinessContainer container, mmBusinessObject businessObject, mmBusinessEntity entity)
at OakLeaf.MM.Main.WPF.mmBusinessWindow.DeleteEntity(mmBusinessObject businessObject, mmBusinessEntity entity)
at OakLeaf.MM.Main.WPF.mmButtonHelper.DeleteHandler(Button deleteButton, ItemsControl itemsControl, String bindingSource, mmBusinessObject& businessObject)
at OakLeaf.MM.Main.WPF.mmButtonDelete.mmButtonDelete_Click(Object sender, RoutedEventArgs e)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
InnerException: System.ComponentModel.Win32Exception
HResult=-2147467259
Message=The wait operation timed out
ErrorCode=-2147467259
NativeErrorCode=258
InnerException: