4
Answers

Pass selected items to query in SQL Server

rulec444

rulec444

20y
1.7k
1
I have built a C# application where users can select from multiple lists of criteria to develop a "set of search criteria" to build a query in SQL Server. This involves multiple listboxes (multi items can be selected), combo boxes (only 1 item can be selected) and a even a datagrid. I'm not sure how to capture all the "selected items" and pass them to parameters into SQL Server. I started to do a massive foreach statement, but I don't even know if that's going to work. Does anyone have a suggestion? Thanks.
Answers (4)