How do I insert records into 2 SQL tables sharing a dependency when I don't commit until the end?
Posted
by Cunning Lingus
on Stack Overflow
See other posts from Stack Overflow
or by Cunning Lingus
Published on 2010-04-21T13:52:51Z
Indexed on
2010/04/21
13:53 UTC
Read the original article
Hit count: 174
transactions
|sql
I keep finding myself in this situtation:
I have an ASP.NEt 2.0 app. I have to insert into 2 tables in SQL. There is a dependency between the tables. I insert a record the first using a transaction. Then I move onto the 2nd table. But, because the first isn't committed yet the second one throws a error.
© Stack Overflow or respective owner