I am Using Begin trans in c# code
here is the case
begin trans
insert in table1
now here is the problem now i have to select the id inserted in above query
but i hvnt commit so the second qry wasnt executed
third qry is to insert in table2 using the id
commit tran
pls tell me solution
Problem in using begin trans in c# code
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Prabhu RajaRank #861 · 2.6K reputationPosted Nov 5, 2011, 3:51 AM EDT
Select ID from table1 where ID = SCOPE_IDENTITY();