I was just asked how to go about passing an array of integers into a stored procedure or function using LINQ to SQL. As I have never done this and don't see anything on Google I figured I would ask here. Thanks!
views:
30answers:
1
+3
A:
If it is a table-valued parameter, then AFAIK there is no direct support at the moment. ADO.NET does though. Another option is to build a delimited string, and split it (perhaps in a udf) at the db. Then it is just a [n]varchar(size)
at the db, and string
in your code - simply to handle.
Marc Gravell
2010-06-29 22:18:14
The passing of a delimited string was my initial reaction. Looks like we will keep that suggestion intact! Thanks for the confirmation.
Andrew Siemer
2010-06-29 22:39:57