| | | | |
| | | | |
| | | | |
for a single table i used datable object and know tell me what to use for various tables also tell me how to update the corrosponding keysforeign of tables
| | | | |
| | | | |
| | | | |
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mohan RajaPosted Jan 27, 2015, 7:49 AM
Follow the below steps to achieve this scenario:
1. Create a procedure by passing a header columns (Table1) as a parameter and passing detail columns (Table 2) as table formatted parameter.
2. Next insert the header table with the parameter values and get the Identity by using @@IDENTITY keyword. (eg., SET _FK = @@IDENTITY)
3. Now insert the detail table values and include the _FK field value in those tables.
Hope this may help.