Monday, 24 November 2008

Distributed Transactions in SQL

Hi, the below is the process of inserting records into SQL Table Using Distributed Transactions

BEGIN TRANSACTION
INSERTINTODACS_Telephones(Registration, Mobile)Values('Nag','Reg')
IF @@ERROR <> 0
BEGIN
ROLLBACK TRANSACTION
END
INSERTINTO Vehicle ([ID],Reg_Trim,Warehouse_ID)Values('Naga','Regist','w1')
IF @@ERROR <> 0
BEGIN
ROLLBACK TRANSACTION
END
COMMIT TRANSACTION

No comments:

Free Hit Counter