TRANSACCTIONAL CONSISTENCY IN VB.NET

  • Thread starter Thread starter Gina L. Hernandez
  • Start date Start date
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,
 
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
 
Back
Top