I am trying to figure out how to pass multiple ListBox items into a stored procedure. What would be the best way to attack this? I'm currently trying to build a dataset based on the selected items, then somehow pass that dataset into the stored procedure. Here is what I have thus far, just a loop through the list box items to see what has been selected:
Dim counter As Integer
Dim ds_selected_items As DataSet
Dim product_code As DataColumn
For counter = 0 To (ListBox1.Items.Count - 1) Step 1
If ListBox1.Items(counter).Selected = True Then
HOW CAN I POPULATE A DATASET AT THIS POINT???
End If
Next
Then, how can I get the list of selected items to be used as parameters in a Stored Procedure?
Dim counter As Integer
Dim ds_selected_items As DataSet
Dim product_code As DataColumn
For counter = 0 To (ListBox1.Items.Count - 1) Step 1
If ListBox1.Items(counter).Selected = True Then
HOW CAN I POPULATE A DATASET AT THIS POINT???
End If
Next
Then, how can I get the list of selected items to be used as parameters in a Stored Procedure?