I have a dataset connection to an MS Access database.
I want to use IN operator in WHERE clause like:
WHERE DepartmentID IN (1,2,3)
This means that all record with an ID of 1, 2 and 3 will be filtered. But the problem is I cannot create a parameter like:
WHERE DepartmentID IN (?)
It only works with WHERE DepartmentID IN (?,?,?). This is okay but the parameter should not limit only to 3 parameter.
A value in IN operator could be 1 or more value.
How to do this in VB.NET?