Answered
Insert into multiple tables; grab id from first
I apologize if this has been answered elsewhere, but I tried
searching and got no results.
I'm trying to insert the contents of one form into two tables. After inserting some fields into one table, I want to grab the key/id from the first table into the second table with the other fields.
I've tried a few different things, including trying to use SCOPE_IDENTITY(), but just kept getting lots of errors.
The current version of my code works perfectly, *except for the fact that it doesn't insert the ID*!
Can anyone tell me what I'm doing wrong? or offer another way of doing this?
Thanks for your help, as usual.
I'm trying to insert the contents of one form into two tables. After inserting some fields into one table, I want to grab the key/id from the first table into the second table with the other fields.
I've tried a few different things, including trying to use SCOPE_IDENTITY(), but just kept getting lots of errors.
The current version of my code works perfectly, *except for the fact that it doesn't insert the ID*!
Can anyone tell me what I'm doing wrong? or offer another way of doing this?
Thanks for your help, as usual.
