I am using LINQ select statement wrapped in a TransactionScope (to change the locking) but according to SQL Profiler, it doesn't seem to be working. My code looks like:
using (var ts = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = IsolationLevel.ReadUncommitted} ))
{
using (myDBDataCo...
I have an endpoint that has a message handler which does some FTP work.
Since the ftp process can take some time, I encapsulated the ftp method within a TransactionScope with TransactionScopeOption.Suppress to prevent the transaction timeout exceptions.
Doing this got rid of the timeout exceptions, however the handler was fired 5 times
...
Hi,
I want to make transactional a series of sp call (sql server 2005) in a .net 2.0 project surrounding some piece of business logic with a
using(TransactionScope...)
Unluckily, I inherited the DAL from another project and I don't want to make many changes there..the problem is that every method that calls a stored procedure opens...
After some discussions with LLBL we have decided that we will end up using MSDTC and Distributed Transactions in order to be able to use implicit Transactions and TransactionScope. See here for details about that decision.
Now we did some testing on what needs to be done for the service to be installed correctly.It seems that when th...
I have a TransactionScope (over DTC, read committed) with a timeout of 60 minutes.
In the TransactionScope I have opened the connection (I hope to enlist in the transaction) but after 30 seconds I get a timeout.
In the machine.config I changed the system.transaction maxTimeout to 60 minutes.
Why does the timeout occur after 30 seconds?...
The following code snippet works fine with SQL Server 2008 (SP1) but with Oracle 11g the call to session.BeginTransaction() throws an exception with the message ‘Connection is already part of a local or a distributed transaction’ (stack trace shown below). Using the '"NHibernate.Driver.OracleDataClientDriver".
Has anyone else run into ...
I have some code that does something like this:
public void DoDatabaseWork()
{
_repositoryIDontControl.SaveSomeStuff(objectThatNeedsStuff.Stuff);
using (var session = ... )
{
session.Save(objectThatNeedsStuff);
}
}
The crux here is that within my NHibernate mapped data model I have an object that references anothe...
Hi! I have a couple of questions about transactions in WF4...
According to this http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/aeab2bcd-26c6-49be-8e08-d65ee2688038
4) There is an implicit Persistence Point at the end of both the TransactionScope and TransactedReceiveScope activities. The persistence operation is ti...
Background: I have an ASP.NET MVC application that wraps controller actions in a TransactionScope using an Action Filter.
Further downstream (in my infrastructure layer); I'd like to open up a new ADO.NET connection (to the same db as my outer TransactionScope, if that is relevent) and have it participate in its own transaction - withou...
Do we have to have to enable MSDTC to use TransactionScope?
I am using TransactionScope and I had error message telling me that the MSDTC not enabled. So I have enabled it.
Why am I having this error message? Is that normal? What`s MSDTC use?
Is transactionScope SQLSecver specific?
...
I use linq-sql and this is what I need.
Sub Commit()
Try
StepStart:
Transaction Scope Serialized
Begin Transaction
Check BusinessRule1
Check BusinesRule2
if BusinessRulesFailed
{ Transaction.Rollback }
else {
Query = db.out
db.SubmitChanges()
Transaction.Commit()
}
Catch DeadLockException
Goto StepStart
End Try
End Sub
Is it ok ...
Does anyone know how to get MySQL transactions working under Mono?
I'm using MySQL Connector/NET (via Subsonic 3) and it works perfectly under Microsoft .NET. Recently however I tried running the same site under Mono on Ubuntu and it almost works - except I can't seem to get transactions working.
Reading around the Mono/MySQL sites ...
TransactionScope is an amazing feature but too few providers do implement it correctly.
I don't want to pass the connection as parameter.
...
this code gives me the error: the Transaction has aborted.
if I remove 1 nested transaction than it doesn't throw
using(var scope = new TransactionScope())
{
repo.Insert(new Foo {Fname = "aaaa"});
using(var s = new TransactionScope())
{
repo.Insert(new Foo { Fname = "aaaa" });
//if ...
I'm writing some Unit tests against a database, and we're using transactions to make sure that our test data gets removed at the end.
I'm running into a problem where methods that I'm testing are using their own TransactionScope objects, and it seems to be blocking when hitting the database.
This is inside my test's base class:
BaseSc...
I am using an object persistence framework called ECO for updating data to SQL Server. I've noticed that if I create a TransactionScope and then deliberately throw an exception after my first transaction has committed but before my second has committed the first database is updated and the 2nd is not.
I thought that simply creating the...
I have a transation that doesn't seem to rollback and getting a strange error. I'm using a transaction that is connected to SQL Server 2008 on a different server and MSMQ on the same server as the code. Here is an example of the code:
void MyMethod()
{
try
{
using (var outterTrans = new TransactionScope())...
Hi,
Where can I find information or how can I handle SQL Server transactions in a BackgroundWorker thread? It's my understanding that error handling should not be set in the "DoWork" event and that the error is handled internally and passed to the 'RunWorkerCompleted".
I am currently using SubSonic as my DAL and passing some lengthy ins...