Hi Member 7909184334,
As per my understanding, you need to select multiple values in a combobox which are to be used in the search query.
If so, then you can get the combobox selected values in an array and set the query as follows:
string str = "SELECT * FROM ['ISB VAS Nodes$'] WHERE HardDisks IN (" + a.toString() + ", " + a.toString() + ", " + a.toString() + ")";
The above part shows that there are only 3 selected options. We can make it dynamic as below:
First get all the selected options into an array, lets call it as aryOptions
string params = string.Empty;
for(int i = 0; i < aryOptions.Length; i++)
params = params + aryOptions[i] + ",";
if(params.Length > 0)
params = params.SubString(0, parmas.Length - 1);
string str = "SELECT * FROM ['ISB VAS Nodes$'] WHERE HardDisks IN (" + params + ")";
Please try this let me know the result.