Hi all,
being new to c# I'm trying to find the best way of passing multiple records
to insert into a sql database via a stored procedure.
I'm using visual studio 2005 RC
SQL server 2005 and C# of course.
My scenario is as follows:
I have a multiline textbox with which users can enter numerous items(one per
line) and all are then added to an Arraylist and then seperatly validated
using a Regex.
Once all valid entries are collated I would then like to run a stored
procedure to add them all to the database.
What's the best way of doing this?
I considered running a foreach loop on every single item but thought this
would be too slow. Is it possible to send the entire arraylist to a stored
procedure and execute the entry into the database there?
Any help would be appreciated.
Thanks