Hi,

I need to do 3 inserts into 3 different tables.

1 Is to link to a TABLE 1 insert values and get the scope identity

2. Use the scope identity and fill in the rest of the values of TABLE 2.

3. Make a comparison between a value in TABLE 1 and another in TABLE 3 and Update values into TABLE 3.


Step 2 and 3 depend on Step1 in a sense that if the insert into Table 1 is not successful then Step 2 and 3 must not exist.

I have read some info about transaction and rollback. Can experience programmer please tell me how to go about this in the most efficient and secure way.

Thanks.