I have created a list in c#, now I need to insert the list into SQL Server 2008.
Is this possible? please explain with a simple example.
I have created a list in c#, now I need to insert the list
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s a simple example:
This just loops through all items in the list and executes one insert-command after the other with
ExecuteNonQuery.Edit: If you want to know the most efficient ways to insert arrays(or lists) into sql-server, you should definitely read this: http://www.sommarskog.se/arrays-in-sql-2008.html
If you have a specific question later, you can come back and show what you’ve tried.