PC Review


Reply
Thread Tools Rate Thread

Convert System.Transactions.Transaction.Current to System.Data.Common.DbTransaction?

 
 
Tim Cartwright
Guest
Posts: n/a
 
      12th Dec 2005
I have been trying to figure out a way to convert
System.Transactions.Transaction.Current to System.Data.Common.DbTransaction
with no luck so far. Is this even possible? I am using the Enterprise
Library, and several of their calls take in a transaction, but it is of type
DbTransaction. I have tried straight casting, but it is not compileable.

DbTransaction transaction = (DbTransaction)Transaction.Current;

Error 1 Cannot convert type 'System.Transactions.Transaction' to
'System.Data.Common.DbTransaction'



 
Reply With Quote
 
 
 
 
Mary Chipman [MSFT]
Guest
Posts: n/a
 
      12th Dec 2005
What are you trying to do, or why are you trying to do this? I suspect
this approach is a dead-end. Perhaps there is another approach to
handling your scenario (but you have to tell us what it is).

--Mary

On Mon, 12 Dec 2005 10:46:49 -0600, "Tim Cartwright"
<(E-Mail Removed)> wrote:

>I have been trying to figure out a way to convert
>System.Transactions.Transaction.Current to System.Data.Common.DbTransaction
>with no luck so far. Is this even possible? I am using the Enterprise
>Library, and several of their calls take in a transaction, but it is of type
>DbTransaction. I have tried straight casting, but it is not compileable.
>
>DbTransaction transaction = (DbTransaction)Transaction.Current;
>
>Error 1 Cannot convert type 'System.Transactions.Transaction' to
>'System.Data.Common.DbTransaction'
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.Transactions.Transaction.TransactionCompleted Event coming on a different thread. Aamir Mahmood Microsoft C# .NET 0 20th Mar 2008 02:27 AM
Access Denied System.Data/System.Transaction Rick Microsoft ASP .NET 1 10th Sep 2007 01:31 PM
Method not found: Dispose System.Data.Common.DbTransaction. cesareiji@gmail.com Microsoft Dot NET Compact Framework 1 15th Dec 2005 08:05 PM
System.Transactions -- "The transaction has already been implicitly or explicitly committed or aborted" exception when opening SqlConnetion Ziga Jakhel Microsoft ADO .NET 4 26th Jul 2005 10:44 PM
System.Transactions -- "The transaction has already been implicitly or explicitly committed or aborted" exception when opening SqlConnetion news.microsoft.com Microsoft ADO .NET 0 19th Jul 2005 10:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:18 AM.