I am Inserting Records in 14 tables
By using loop and condition i am inserting this records
this cause slowness in my form submission
Pls Guide me
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Dhirendra MisraRank #4,173 · 360 reputationPosted Jan 6, 2014, 6:48 PM EST
If you are using SQL Server 2008 and framework version 3.5, you can make use of "Table-Valued Parameters" and make collection of values in table and pass it to Stored Procedure. The stored procedure should have all condition to insert the data at respective tables.
Detail description about table-valued parameter can be found here:
http://msdn.microsoft.com/en-us/library/bb675163(v=vs.110).aspx
There is option of bulk insert as well but it needs single table where data needs to be persisted. Have a look at the link below it may be a thing of your interest.
http://www.morgantechspace.com/2013/08/bulk-insert-records-into-sql-server.html
Thanks