Click here to Skip to main content
15,074,065 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,

I have to insert values into 2 database tables at a time.So i thought to use table valued parameter in stored procedure.is it correct approach to do it.
Or else is there any better options to do.

Thanks in advance.
Posted
Comments
CHill60 8-Jul-14 6:02am
   
If you only have 2 values there is not much point in a table valued parameter (unless you think the number of values will increase in the future). You can only insert into one table at a time (with any 1 connection) ... what are you actually trying to achieve? Are you getting confused with Transactions perhaps?
Nywalikar 8-Jul-14 7:52am
   
Hi.
Thanks for your reply.
i have too many parameters and datatable to insert into 2 tables..i have to insert parameters into table1 and to insert one parameter and datatable rows into table2.. so i am bit confuse that how can i make out this..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900