Using GenericDatabase with ODP.NET and System.Transactions

Dec 15, 2008 at 3:11 AM
Edited Dec 15, 2008 at 5:38 AM

Hi,
I am using ODP.NET with the DbProviderFactory and GenericDatabase class and it is working very well. eg.

DbProviderFactory dbFactory = DbProviderFactories.GetFactory("Oracle.DataAccess.Client");
GenericDatabase database = new GenericDatabase("connectionstring...", dbFactory);

However, I am unclear on how best to use transactions with the GenericDatabase. I want to take advantage of the Database.UpdateDataSet (DataSet, String, DbCommand, DbCommand, DbCommand, DbTransaction) helper method.  Oracle.DataAccess.Client.OracleTransaction implements DbTransaction so this is an option. But ODP.NET also supports System.Transactions so I expect I can just make any calls in a TransactionScope as usual.
Which way is best? OK, I'm sure the answer starts with "It depends..." but any comment would be welcome!

Thanks,
Ad

Dec 15, 2008 at 7:18 AM
I've just come across this thread, see if it helps... http://groups.google.com.au/group/microsoft.public.dotnet.framework.adonet/browse_thread/thread/1d9c14e4bbba3918/f8908aef63814046?lnk=st&q=.net+2.0+transaction&rnum=1&hl=en#f8908aef63814046


Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com
Sep 4, 2013 at 4:14 PM
Any full source code sample ?