Parameters with IN clause.

  • Thread starter Thread starter Satish Itty
  • Start date Start date
S

Satish Itty

Im using OleDb

How do I send a parameter to an In clause ? My SQL is like this.

Select name from contact where accountid in (?)

accountids are char fields of length 15.
Since the number of arguments inside the in clause could vary I cannot go on
putting ? for each item in it.
I tried creating a coma seperated string of accountids and then tried to
send it as a paramerter to the dbcmd. When executing I think the command
considers the value of my paramerter as one string instead of an array of
values.

Im sure someone would have come across this problem. Any help would be
appreaicated.
 
Back
Top