Hello,
Assuming that you have coded the data logic by hand, and you have a connection instance which you use a command object against to complete the update, then something along the following lines:
//Put the appropriate parts of thsi in your try block:
SqlTransaction transaction = connection.BeginTransaction();//assumes a SqlConnection var named connection exists, and is open and otherwise configured
command.Transaction = transaction;//assumes a SqlCommand var named command exists and is associated with the connection
//Other code omitted
command.Exec...();//Execute whatever is appropriate, NonQuery, Scalar etc...
transaction.Commit();//if all goes well in the try block, then commit the transaction
//put this part in your catch block:
transaction.Rollback();//if something goes wrong, then roll it back
Parts of above are written for the SQL provider, but AFAIK other managed providers use the same pattern so you will just need to substitute if required.
If this is not what you were looking for, can you give us some indication as to how you are conducting your data access? Do you have a data access layer?
HTH
Aaron