Trying to figure out why this error occurs.

Posts   
 
    
MarcoP avatar
MarcoP
User
Posts: 270
Joined: 29-Sep-2004
# Posted on: 01-Aug-2011 14:27:53   

I have the following code that throws the following exception sporatically and I was wondering if anyone has any ideas.

        public static void StartTransaction(this IDataAccessAdapter adapter, Action action)
        {
            try
            {
                adapter.StartTransaction(IsolationLevel.ReadCommitted, "execute");
                action();
                adapter.Commit();
            }
            catch (Exception ex)
            {
                adapter.Rollback();
                throw ex;
            }
        }

Here is the exception info.

Exception Stack Trace: at System.Data.SqlClient.SqlTransaction.ZombieCheck() at System.Data.SqlClient.SqlTransaction.Rollback() at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.Rollback() at HIA.DataAccessAdapterExtensions.StartTransaction(IDataAccessAdapter adapter, Action action) in C:\development\4.0\HIA\src\HIA.Core\Extensions\DataAccessAdapterExtensions.cs:line 22 at HIA.Core.Events.Commands.GrantPointsCommandHandler.Execute(GrantPointsCommand command) in C:\development\4.0\HIA\src\HIA.Core\Events\Commands\GrantPointsCommand.cs:line 86 at Touchstone.Common.Commands.CommandHandler`2.Execute(Command command) at Touchstone.Common.Commands.CommandExecuter.Execute[TCommandResult](Command command) at HIA.Web.Views.Events.GrantPointsPresenter.GrantPointsFromRequest() in C:\development\4.0\HIA\src\website\DesktopModules\HIA.Web\Views\Events\GrantPointsPresenter.cs:line 103 at HIA.Web.Views.Events.GrantPointsPresenter.OnViewInitialized() in C:\development\4.0\HIA\src\website\DesktopModules\HIA.Web\Views\Events\GrantPointsPresenter.cs:line 42 Additional Info:

Thanks

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 01-Aug-2011 15:38:14   

Exception info please simple_smile

MarcoP avatar
MarcoP
User
Posts: 270
Joined: 29-Sep-2004
# Posted on: 01-Aug-2011 16:02:36   

crap sry simple_smile

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 01-Aug-2011 16:09:46   
MarcoP avatar
MarcoP
User
Posts: 270
Joined: 29-Sep-2004
# Posted on: 01-Aug-2011 16:19:38   

thank u