Oracle, Dataset Designer, and Transactions

G

Guest

I am building a windows forms app using VS2005 and the dataset designer to
connect to an Oracle backend. So far this has worked quickly and easily for
me to finish the app within the given timeframe.

I would love to add transactioning to some of the calls to add robustness.
I can begin the transaction on the tableadapter, but I cannot find a way to
enlist the various predefined commands for each tableadapter into the
transaction. Or do the commands automatically enlist themselves in the
transaction with a System.Data.OracleClient type connection?

Thanks in advance for any information.
 
M

Michael Nemtsev

Hello maltobelli,

for oracle, transactions are implicit for each connection

m> I am building a windows forms app using VS2005 and the dataset
m> designer to connect to an Oracle backend. So far this has worked
m> quickly and easily for me to finish the app within the given
m> timeframe.
m>
m> I would love to add transactioning to some of the calls to add
m> robustness. I can begin the transaction on the tableadapter, but I
m> cannot find a way to enlist the various predefined commands for each
m> tableadapter into the transaction. Or do the commands automatically
m> enlist themselves in the transaction with a System.Data.OracleClient
m> type connection?
m>
m> Thanks in advance for any information.
m>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
G

Glenn

If you're using .NET 2.0 you have the option of using TransactionScope.
Although this can have a performance hit.

The other option is to use transaction directly by extending your table
adapter with a BeginTransaction method. The method should first check that
the current connection is open. Then create a transaction from the adapters
Connection property and assign it to each command (I,U,D) and the
_commandCollection. Remember to check for nulls! Then return the
transaction. It's not a lot of work, honest.

I'd also recommend you take a look at ODP.NET. It's brimming with neat
stuff and the documenation is superb, all 1212 pages of it!

http://www.oracle.com/technology/tech/windows/odpnet/index.html

HTH

Glenn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top