StrataFrame Forum

Transaction Key Already Started Error

http://forum.strataframe.net/Topic13157.aspx

By choyt - 12/24/2007

Hi All

I am occasionally getting tis error directly after running a transaction that failed. I have verified that the rollback occured both by walking through the code and looking at the table afterward.

The only way I have found to fix this is to stop my services and restart them. Is there a more graceful way to do this? It seems to only happen when I'm using a Transaction Key. I considered creating a random transaction key but am concerned about not releasing resources.

Thanks!

Clay

System.ArgumentException was caught
  Message="A transaction with the key [StopItin] is already started."
  Source="MicroFour StrataFrame Base"
  StackTrace:
       at MicroFour.StrataFrame.Data.DbDataSourceItem.TransactionBegin(String TransactionKey, IsolationLevel Level)
       at MicroFour.StrataFrame.Data.DataLayer.TransactionBegin(String DataSourceKey, String TransactionKey, IsolationLevel IsoLevel)
       at MicroFour.StrataFrame.Business.BusinessLayer.TransactionBegin(String DataSourceKey, String TransactionKey, IsolationLevel IsoLevel)
       at PIPS.BO.TravelVoucher.ItineraryStopInfo.DoInsert(Int64 PCSDataPackageTravelVoucherID, Type ReasonForStopID, String StopLocation, Type TravelModeID, DateTime ArrivalDateThisLocation, DateTime DepartureDateThisLocation, String CurrentUser, Int32 StopNumber, StopBeforeAfter StopBeforeAfter, Decimal LodgingCost, Decimal TransportationCost, Type PrivatelyOwnedConveyanceTypeID, DateTime RAPStartDate, DateTime RAPEndDate, DateTime PortCallDate, DateTime SignInDate) in E:\SDI\PIPSDevelopment\PIPSBO\DataManipulationClasses\TravelVoucher\ItineraryStopInfo.vb:line 63

By choyt - 12/24/2007

After this error, I receive this one.

System.InvalidOperationException was unhandled by user code
  Message="This SqlTransaction has completed; it is no longer usable."
  Source="App_Web_jhijnyox"
  StackTrace:
       at ItinStopInfo.btnContinue_Click(Object sender, EventArgs e) in E:\SDI\PIPSDevelopment\PIPSWebsite\MbrTrvVoucher\ItinStopInfo.aspx.vb:line 111
       at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
       at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)