Hi,
I use Visual studio datasets to create table adapters etc. for queries. This normally works fine for me with 'simple' queries (i.e. only 1 parameter of type string, int ...). However if I specify the following query in the dataset:
SELECT * from tblTable WHERE tblId IN (@idList)
the query editor accepts, but the generated code will create a function that just accepts a single integer. Changing the type of idList to string and passing in a string in the form of "1,2,3" also doesn't work.
Is it at all possible to use the IN keyword in queries using the datasets, and if so, what is the way to do this?
Thanks very much in advance!
Arthur
I use Visual studio datasets to create table adapters etc. for queries. This normally works fine for me with 'simple' queries (i.e. only 1 parameter of type string, int ...). However if I specify the following query in the dataset:
SELECT * from tblTable WHERE tblId IN (@idList)
the query editor accepts, but the generated code will create a function that just accepts a single integer. Changing the type of idList to string and passing in a string in the form of "1,2,3" also doesn't work.
Is it at all possible to use the IN keyword in queries using the datasets, and if so, what is the way to do this?
Thanks very much in advance!
Arthur
Comment