I'm not sure how to discribe this but i'll give it my best shot.
I know SQL Server can insert multiple rows at once, but where I need some assistance is how to pass that data to a stored procedure. I have a form with a grid in my application, and for each row selected in the grid, I want to pass all selected rows at once to a stored proc and have them inserted.
I don't want to insert one row at a time because that would entail caling the stored proc multiple times.
How can I pass multiple records to a stored proc and have them inserted? once all the records are in the proc, I don't care how the inserts are done, whether it be one large insert or looping through and inserting (although, one large insert would be more efficient).
Thanks...
Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html