TRANSACCTIONAL CONSISTENCY IN VB.NET

G

Gina L. Hernandez

Hello:


I have a web application server. My application needs to access to
different servers at the same time. This is the scenario:

I need to read information from server1, make some updates to this data in
server1 and at the same time I have to update a second database in server2
(My SQL COMMANDS are in stored procedures in my 2 servers). The thing is I
need to keep the consistency between the data, so if something bad happens
in any point of the transacction I have to apply a ROLLBACK TRAN to all the
procedure. I need to know what is the best way to do it from VISUAL
..NET or if there any way to do it from my first stored procedure.

Thanks,
 
G

Graeme Malcolm \(Content Master Ltd.\)

Create a serviced .NET component containing the code that connects to the
databases and calls the stored procedures. A serviced component (used to be
called COM+) uses the Component Services functionality in Windows, which is
based on the Distributed Transaction Co-ordinator, and so it can enforce
distributed transactions like the one you're trying to implement.

See
http://msdn.microsoft.com/library/d...guide/html/cpconwritingservicedcomponents.asp
for more info on serviced components.

Hope that helps,
Graeme
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top