Action Stored Procedures and Transactions

Posts   
 
    
mainfram
User
Posts: 6
Joined: 26-May-2004
# Posted on: 16-Jul-2004 06:54:08   

Hi,

Is there a way of using Action Stored Procedures within a transaction, so that everything the store procedure modifies, is reverted if need be?

Cheers,

Edin

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39866
Joined: 17-Aug-2003
# Posted on: 16-Jul-2004 09:05:54   

Currently only in Adapter. Support for it in Selfservicing is in the works.

Frans Bouma | Lead developer LLBLGen Pro
Perche
User
Posts: 10
Joined: 07-Aug-2008
# Posted on: 07-Aug-2008 22:05:28   

What command should one use to run a stored procedure within a Transaction using a DataAccessAdapter?

I have successfully used CallActionStoredProcedure with an adapter but coding all those SqlParameter properties is tedious and seems to defeat the purpose of LLBLGEN.

Members of the ActionProcedures class handle parameters elegantly, but it seems it cannot be used directly with an instance of DataAccessAdapter.

It seems that the ActionProcedures methods can be used with a UnitOfWork2 instance which in turn can be used with an adapter. However, the output parameters of the stored procedure are not returned to the VB program.

I am trying to retrofit Transaction/Commit/Rollback processing to old VB.NET code that uses a mix of SaveEntity and ActionProcedures methods with no intermediate user interaction.

Have you any suggestions?

Thanks.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 08-Aug-2008 07:38:31   

You should be able to do this

// here theAdapter already started a transaction.
ActionProcedures.YourSP(value1, value2..., theAdpater);

instead of theAdapter.CallActionStoredProcedure(...)

Are you doing that way?

Next time, please follow these instructions wink : http://llblgen.com/TinyForum/Messages.aspx?ThreadID=7725

David Elizondo | LLBLGen Support Team