views:

394

answers:

3

I want to run two transactions simultaneously. So i gave MultipleActiveResultSet = false in the connection string as specified in an MSDN article. But after modifying the connection string i get "Target machine actively refused". I'm working with WCF.

Any ideas in this?

Thank you.

A: 

Are you sure "Target machine actively refused" is related to parallel transactions?

It usuall means the machine is not listening on the port you're trying to talk to.

Andomar
Yes. If i remove the MultipleActiveResultSet entry from the connection string, everything works fine.
NLV
Can you post the connection string (without password ofc)?
Andomar
Okie, i now feel that my question is absurd. The problem is with the code logic. Sorry.
NLV
+1  A: 

Can you explain what you're trying to do please?

A transaction is atomic and isolated (so effectively per connection). You can't do 2 simultaneous transactions for one connection/session: it makes no sense

gbn
An MSDN page for SQL Server Compact mentions "does support parallel transactions in ADO .NET" http://technet.microsoft.com/en-us/library/ms172400(SQL.90).aspx, though I'm unsure what it means
Andomar
Thanks. Odd concept. Not nested though.
gbn
+1  A: 

I was under the impression that MARS only really applies to the special case of getting multiple forward-only read-only resultsets on a single connection, but that regular operations have to have their own connections.

Cade Roux