Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0why DNN doesnwhy DNN doesn't use application level Transactions?
Previous
 
Next
New Post
8/5/2007 11:48 AM
 

This is something I will need to look at as my business object layer is slightly more complicated than a simple entity object...

 

For example, I have an EventInfo object and a ContributorInfo object.  There are potentially multiple contributors to an event, so I expeose a generic <list> property on the EventInfo object which contains my multiple ContributorInfo objects.

I then pass this one EventInfo object to my DAL+.  Within the Insert routine I will execute one stored procedure to add a row into the events table. I will then need to loop through my collection of Contributors and for each one, populate a row.

It would make real sense that all this is done in one transaction scope.

Is it not possible to just use System.Transactions?

Thanks,

Olly

 

 
New Post
8/5/2007 12:36 PM
 

Probably easier if I explained what I was trying to do.

I have a module similar to an order entry screen, i.e. a number of order lines associated with a single order. The order lines are stored locally in a DataTable until it is commited. I have a For ... Each loop that calls a stored procedure, via a DAL+ controller, for each record but if one of these fails I want to rollback the whole order, deleting any that have already been added. While the DAL+ methods can be coded to execute the Stored Procedure I wanted to create an SQLTransaction object but needed access to the appropriate SQLConnection object that the Dataprovider.Instance refers to - but could not seem to access it.

I can probably pull something together but wanted a slick solution.

THanks again for your input.

 
New Post
8/5/2007 3:28 PM
 

 Thanks for your response.

My conclusion based on my analysis and above conversation,

  • DAL, DAL+ doesn't allow application level transactions.
  • If any task requires application level transaction ( DBTransaction, TransactionScope), then you have write your own Data Access Layer.

-Mals

 

 
New Post
8/5/2007 3:29 PM
 

DaveCarson wrote

Probably easier if I explained what I was trying to do.

I have a module similar to an order entry screen, i.e. a number of order lines associated with a single order. The order lines are stored locally in a DataTable until it is commited. I have a For ... Each loop that calls a stored procedure, via a DAL+ controller, for each record but if one of these fails I want to rollback the whole order, deleting any that have already been added. While the DAL+ methods can be coded to execute the Stored Procedure I wanted to create an SQLTransaction object but needed access to the appropriate SQLConnection object that the Dataprovider.Instance refers to - but could not seem to access it.

I can probably pull something together but wanted a slick solution.

THanks again for your input.

You can use TransactionScope()

see: http://www.dotnetbips.com/articles/88bda72f-3bea-40ab-83ca-814bb0f7310d.aspx



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
8/6/2007 8:16 AM
 

Mals001 wrote

  • DAL, DAL+ doesn't allow application level transactions.
  • If any task requires application level transaction ( DBTransaction, TransactionScope), then you have write your own Data Access Layer.

Have you tried this and confirmed this?



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0why DNN doesnwhy DNN doesn't use application level Transactions?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out