Page 1 of 1

Passing array as parameter for prepared query ?

Posted: Mon 20 Nov 2006 17:30
by AlexanderPriem
Hello,

I have a prepared query like the following :

Select * From TableName Where Field1 In @1;

Now I want to pass an array of integer to the parameter @1, like this :

objCommand.Parameters.Item['@1'].set_Value(arrValues);

But I get an error saying the "Method is not supported".

Is it possible to pass an array of integer as a parameter to a prepared query, and if so, how would I do this ?

Kind regards,
Alexander Priem.

Posted: Tue 21 Nov 2006 08:07
by Alexey
No, it is not possible to pass an array as a parameter to a statement.