PC Review


Reply
Thread Tools Rate Thread

ADO.NET Transaction without SqlClient?

 
 
localhost
Guest
Posts: n/a
 
      16th Mar 2004

Is it possible to do an ADO.NET transaction using just the OleDb space
and not touch the managed SqlClient at all?

I am trying to build a common data component that must work with
Oracle and MsSql and 3 other databases, all support XA-style
transactions. I hope that I can use just the OleDb provider to do
transactions so keep from doing many provider-specific things.

Is it possible?

Thanks.


 
Reply With Quote
 
 
 
 
Miha Markic [MVP C#]
Guest
Posts: n/a
 
      16th Mar 2004
Sure (but it is a database transaction, never an ado.net transaction).
See OleDbConnection.BeginTransaction Method.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com


"localhost" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
>
> Is it possible to do an ADO.NET transaction using just the OleDb space
> and not touch the managed SqlClient at all?
>
> I am trying to build a common data component that must work with
> Oracle and MsSql and 3 other databases, all support XA-style
> transactions. I hope that I can use just the OleDb provider to do
> transactions so keep from doing many provider-specific things.
>
> Is it possible?
>
> Thanks.
>
>



 
Reply With Quote
 
Kevin Yu [MSFT]
Guest
Posts: n/a
 
      17th Mar 2004
Thanks for Miha's quick response!

Hi localhost,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to start transactions in the
OleDb provider. If there is any misunderstanding, please feel free to let
me know.

We can use OleDbTransaction class to achieve this. Just as Miha said, using
OleDbConnection.BeginTransaction method, we can get an OleDbTransaction
object to manipulate on. For more information about OleDbTrasaction class
and OleDbConnection.BeginTransaction method, please check the following
links:

http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemdataoledboledbtransactionclasstopic.asp

http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfSystemDataOleDbOleDbConnectionClassIDbConnectionBeginTransactionTopic.a
sp

HTH. If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

 
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
Error message 3003 couldn't start transaction, to many transaction =?Utf-8?B?am9rb2Jl?= Microsoft Access Form Coding 4 24th Aug 2006 10:14 AM
"Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction." Ollie Riches Microsoft C# .NET 3 11th Mar 2005 06:23 PM
"Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction." Ollie Riches Microsoft ADO .NET 3 11th Mar 2005 06:23 PM
executenonquery vs transaction sqlclient/sql server Chance Hopkins Microsoft ASP .NET 9 7th Dec 2004 04:41 PM
Exception when closing SqlClient connection in a distributed transaction S?ren Mondrup Microsoft ADO .NET 1 16th Dec 2003 01:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:43 PM.