Parameters with IN clause.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top