With so little information it is almost impossible to give you proper advice. However the following information may prove useful to you...
Learn about SQL Transactions. Some links -
A Beginner's Tutorial for Understanding Transactions and TransactionScope in ADO.NET[
^]
SQL Transactions[
^]
and TRY-CATCH - see
Using Try... Catch..., Finally![
^]
e.g.
BEGIN TRY
BEGIN TRANSACTION
-- update table T1
-- update table T2
-- update table T3
COMMIT TRANSACTION
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION
END CATCH
Either all three tables will be successfully updated or none of them will.
The fact that you are having to update 3 linked tables may mean that you haven't normalised your database sufficiently - have a look at
Basics of Normalization[
^]