Hello,
we have written a C# 3.5 client talking to an Oracle database (11g) using the ODP.NET.
This application has a batch process where a long running task is performed making various calls to the database within a TransactionScope.
On our development environment all goes well, but at the UAT environment of one of our clients (who ha...
Is there a way to check if code is executed in a TransactionScope?
Something like:
if(TransactionScope.Started|Enabled){...}
...
Hi just reading about using transaction scrope, previously I am used to making transactions inside a single DB class like
try
{
con.Open();
tran = con.BeginTransaction();
OleDbCommand myCommand1 = new OleDbCommand(query1, con);
OleDbCommand myCommand2 = new OleD...
Hi !
This question is purely AR related.
Let's say I have 2 layers in my web/wcf application - DataLayer and BusinessLayer.
DataLayer contains almost atomic operations that work on mappings (find, get, save, special find, cross find , etc. :) ). There is a lot of HQL or Criterias. There's no SessionScopes used in this layer. Some of my ...
Hi,
We know that TransactionScope class can use user-defined timeout value. But timeout exception is thrown while exiting from the using {} block. How to throw this timeoutexception immediately after elapsed timeout value?
...
Good Morning All,
I have code similar to the following
try{
using(var tx = new TransactionScope()){
var Xupdated = someDao.DoSomeUpdateQuery(); //this dao uses MS Data ApplicationBlock
var Yupdated = someDao.DoSomeOtherUpdateQuery(); //this dao also uses MS Data ApplicationBlock
if(Xupdated && Yupdated)
...
What is the dll that must be used? Where can I have it?
I am using Nhibernate, can I use it with NHibernate?
...
When Method1() instantiates a TransactionScope and calls Method2() that also instantiates a TransactionScope, how does .Net know both are in the same scope?
I believe it doesn't use static methods internally otherwise it wouldn't work well on multithreaded applications like asp.net.
Is it possible to create my own TransactionScope-like ...
I am using LINQ To SQL and calling stored procedures to insert the new rows.
Does the code below demonstrate an appropriate set of steps?
I want to insert (other fours) only if all four inserts are passed otherwise rollback all four inserts.
public bool InsertNewInquiry(Inquiry inq)
{
using (var transaction = new TransactionSco...
My system write some data to a SQL Server DB (2008), extracts it later and processes it some more, before writing it to an Oracle (10g) DB.
I've wrapped my SQL Server interactions in a TransactionScope but when I try the same think with my Oracle interactions I get a `TranactionAbortedException - "The transaction has aborted".
Remove ...
If create a custom of IEnlistmentNotification is it possible to make it the first implementation executed when TransactionScope.Commit is called?
...
I am trying to use TransactionScope with NHibernate in order to call several methods in one transactions. Data repository methods are like this:
public virtual void Save(T dataObject)
{
try
{
using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = I...
I have a TransactionScope object and I want to use it for all the tasks created using Parallel.ForEach, how do I achieve this?
I want to writing to a message queue in parallel, 20-50 messages, message queue is transactional:
using (var queue = new MessageQueue(_exportEndpoint))
{
var label = string.Format("{0} ComponentId - {1}...
I have seen System.Transactions namespace, and wondered, can I actually make a RDMBS with this namespace usage?
But when I saw some examples, I do not understand how System.Transactions does anything beyond simple try catch and getting us success/failure result?
This is the example on MSDN's website, I know it may be very simple but I...
I have a scenario where I need to open multiple datacontexts which point to different databases. I am only writing to one of the databases though and reading from the others ... so technically the transaction should only be against one of the databases.
I'd like to avoid having the TransactionScope upgrade into a distributed transaction...
The current implementation of TransactionScope lacks the ability to change IsolationLevels in nested scopes.
MSDN states: When using nested TransactionScope objects, all nested scopes must be configured to use exactly the same isolation level if they want to join the ambient transaction. If a nested TransactionScope object tries to joi...
I am running into situations in my application where I need to use table lock hints or set the transaction isolation level to something other than the default Read Committed, in order to resolve deadlock issues. I am using a service oriented architecture, with each service call operating as an atomic operation, and Linq To Sql is servin...
I have WebService that is hosted by ASP.NET web site. Inside the TransactionScope object is used to handle transactions:
using (TransactionScope scope = new TransactionScope())
{
...
scope.Complete();
}
The problem is that during debugging, when I am going through each line in step-by-st...
Hi
Can someone shed light on what is happening behind the scenes with the SQL Lightweight transaction manager when multiple connections are opened to the same DB?
With the below code, we verified that MSDTC is indeed not required when opening 'multiple connections' to the same database.
In the first scenario (where Txn1 and Txn2 use E...
I'm using PowerShell transactions; which create a CommittableTransaction with an IsolationLevel of Serializable. The problem is that when I am executing a Transaction in this context all SELECTs are blocked on the tables affected by the transaction on any connection besides the one executing the transaction. I can perform gets from withi...