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.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
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.