Command with parameters and IN SQL operator

  • Thread starter Frédéric Mayot
  • Start date
F

Frédéric Mayot

Hi,
It seems that this code does not work, what's wrong ??
dim s as string = "SELECT * FROM sometable WHERE somefield IN (@stuff)" '
where somefield is an int
dim cmd as new command
dim arr() as integer
[...]
if arr.length > 0 then
cmd.parameters.add(new sqlparam("@stuff", arr))
[...]
end if
 
W

William \(Bill\) Vaughn

Hit the archives for this one. It's been discussed a dozen times. (google
groups)

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
F

Frédéric Mayot

Sorry, I've already tried many google queries but I didn't find anything...
 

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