Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
skiabox
Posting Yak Master
169 Posts |
Posted - 2009-09-15 : 08:15:43
|
| I need to insert a List<string> parameter from my code (c#) to a stored procedure so that I can loop in the stored procedure with a function that accepts one parameter.Is there any way I can do that?Thank you! |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2009-09-15 : 08:18:12
|
| Is this for a CLR stored procedure inside your database? |
 |
|
|
skiabox
Posting Yak Master
169 Posts |
Posted - 2009-09-15 : 08:27:28
|
| I have not created the stored procedure yet.I have created two functions.I need the stored procedure so that I can loop through my function, because this function accepts only one parameter and I want to pass from my code more than one parameter at once(that's why I use a List<string>) |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-09-15 : 08:30:00
|
| Are you trying to pass csv as parameter to the procedure?If so, serach for Array+SQL Server in googleMadhivananFailing to plan is Planning to fail |
 |
|
|
skiabox
Posting Yak Master
169 Posts |
|
|
skiabox
Posting Yak Master
169 Posts |
Posted - 2009-09-16 : 08:48:26
|
| Should I use a cursor in my stored procedure so that I can loop in the incoming list of parameters and be able to call my one parameter function that returns a table in every loop? |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2009-09-16 : 10:23:51
|
| It might be better to describe what the function does and what kind of results you're expecting (posting code would help too). It could probably be modified to accept a list and return all the results in one call. This is far preferable than looping or cursoring in SQL Server. |
 |
|
|
|
|
|