Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
This SqlTransaction has completed
Message
De
08/12/2014 18:49:00
 
 
À
08/12/2014 08:03:52
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 4.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01611466
Message ID:
01612020
Vues:
41
>>>>I am getting this error when I try to save a record:
>>>>
>>>>System.InvalidOperationException was unhandled by user code
>>>> HResult=-2146233079
>>>> Message=This SqlTransaction has completed; it is no longer usable.
>>>> Source=System.Data
>>>> StackTrace:
>>>> at System.Data.SqlClient.SqlTransaction.ZombieCheck()
>>>> at System.Data.SqlClient.SqlTransaction.Rollback()
>>>> at OakLeaf.MM.Main.Data.mmDataAccessBase.TransactionRollback(IDbTransaction transaction, IDbConnection connection)
>>>> at OakLeaf.MM.Main.Data.mmDataAccessSql.TransactionRollback()
>>>> at OakLeaf.MM.Main.Business.mmBusinessObject.TransactionRollback(String databaseKey)
>>>> at OakLeaf.MM.Main.Business.mmBusinessObjectGeneric`1.TransactionRollback(String databaseKey)
>>>> at OakLeaf.MM.Main.Business.mmBusinessObject.TransactionRollback()
>>>> at OakLeaf.MM.Main.Business.mmBusinessObjectGeneric`1.SaveEntityList(mmBindingList`1 entityList)
>>>> at OakLeaf.MM.Main.Business.mmBusinessObjectGeneric`1.SaveEntityList()
>>>> at OakLeaf.MM.Main.WPF.mmBusinessUIHelper.SaveEntityList(ImmBusinessContainer container, mmBusinessObject businessObject)
>>>> at OakLeaf.MM.Main.WPF.mmBusinessWindow.SaveEntityList(mmBusinessObject businessObject)
>>>> at OakLeaf.MM.Main.WPF.mmButtonHelper.SaveHandler(Button button, Boolean saveAll, ItemsControl itemsControl, String bindingSource, mmBusinessObject& businessObject)
>>>> at OakLeaf.MM.Main.WPF.mmButtonSave.mmButtonSave_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:
>>>>
>>>>I have no idea where to start on this one.
>>>>
>>>>Any suggestions as to what could be the cause?
>>>
>>>Can you put a breakpoint in the Save button's click and step through the code in debugger? Also, before trying if you're doing tests locally, try stopping SQL Server and re-start. I suspect you have doomed transaction, re-starting the server is a drastic measure, of course, but if it's local, it should not be too much of a trouble.
>>
>>Thanks, restarting didn't make any difference. The button is part of the mm.net framework so there is no code in the button's click. I'll have to work out how to step through the framework's code.
>>
>>This happens if I open the same screen twice with different sets of data and then try to and a new record on one of them and then hit Save. The screen works fine if I only have the screen open once. Does that give you any hints as to what the cause could be?
>
>Hi Frank,
>
>I assume you have figured this out by now, but you should still be able to override the click event and put a break point in. Is this a web or windows application you are working on?
>Timothy Bryan

Hi Timothy,

no I haven't worked it out yet. I did however program it differently, but I would still love to find out what the problem is.

It is a XAML desktop application.

I'm sure I knew how to debug this at one point in time, but don't work with this often enough.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform