Re: Sharing a ADO connection between two processes - Can it be done ?
- From: "Herby" <prmarjoram@xxxxxxxxx>
- Date: 2 Oct 2006 07:38:35 -0700
Paul Clement wrote:
On 2 Oct 2006 04:14:29 -0700, "Herby" <prmarjoram@xxxxxxxxx> wrote:
¤ We have a client and server application that run on the same machine.
¤ We want both to participate in the same transaction.
¤
¤ To acheive this I understand they need to share the same connection
¤ object.
¤
¤ The server currently supports a COM interface, as the client passes
¤ across copies of simple data types Strings and integers etc.
¤
¤ But now they want to pass across the client ADO connection object. The
¤ data-writes within the server should then use this connection object
¤ for creating its recordsets etc.
¤
¤ On return to the client - the client may then decide to commit or
¤ rollback via the same connection object.
¤
¤ I understand the server would have a proxy back to the actual
¤ connection object residing in the client address space. Is this going
¤ to work?
No don't do this. ADO Connection objects do not marshal properly across processes.
Your data access layer should be handling the transaction. I don't see any reason for the
transaction to occur across processes. However, it you want the client to determine whether the
transaction is committed or rolled back you may want to consider using COM+.
Paul
~~~~
Microsoft MVP (Visual Basic)
Thanks Paul.
But the problem is the two do not share a common data access layer.
Although, agreed, they should from a well designed perspective. But
this is old code and a complete rewrite to support this is not viable
at present.
Both point to the same underlying DBMS and share the same data.
So currently the client does some work, then calls the server, the
server does some work.
The client then decides to rollback. Problem the servers changes
remain committed.
Are you saying its impossible for two processes on the same machine to
participate in the same
transaction via ADO?
Im just assuming in order to participate in the same transaction they
need to share the same connection object?
Moving to COM+ - Can you recommend and article to read up on that could
support this requirement?
Thanks in advance.
.
- Follow-Ups:
- References:
- Prev by Date: Re: Sharing a ADO connection between two processes - Can it be done ?
- Next by Date: Re: Sharing a ADO connection between two processes - Can it be done ?
- Previous by thread: Re: Sharing a ADO connection between two processes - Can it be done ?
- Next by thread: Re: Sharing a ADO connection between two processes - Can it be done ?
- Index(es):
Relevant Pages
|