WHERE IN parameter

  • Thread starter Thread starter Gary B
  • Start date Start date
G

Gary B

I saw an old thread here that said that ado.net does not support parameters
for the where in clause in stored procedures. However, I am trying to
supply a parameter for the where in clause from my vb.net program and it
won't seem to work.

The string I build has the following: ('california', 'oregon') but when I
look at it in the SQL Profiller it says (' ' california ' ', ' 'oregon' ') -
it's got extra single quotes. When I construct the string with no quotes at
all it goes through that way. neither works.

Should this work or are parameters not supported for where in at all?
Thanks,
Gary
 
Hi,

It is not .NET problem. It is limitation of SQL syntax when you cannot use
any parameter for IN clause. You would need to build your SQL statement
dynamically
 
Back
Top