How to Insert more than one row in a single click using stored procedure
-
Hi I have a datatable having 10 records. I want to insert the 10 records to a table in a database using stroed procedure from my front end C#. How to do? can any one help me please? Thanks in advance kesavan
kesavan
Write a stored procedure to insert 1 row. Then call that stored procedure once for each of the rows you which to insert. If they have to be done together, do the whole thing inside a transaction.
Simon
-
Hi I have a datatable having 10 records. I want to insert the 10 records to a table in a database using stroed procedure from my front end C#. How to do? can any one help me please? Thanks in advance kesavan
kesavan
-
Write the stored procedure to accept an xml parameter. Send all 10 records as xml and unpack in the stored proc to insert them.
Bob Ashfield Consultants Ltd
Here you go: Multiple Ways to do Multiple Inserts[^]
Giorgi Dalakishvili #region signature my articles #endregion