This is a migrated thread and some comments may be shown as answers.

Multi-Value parameter with "Allow Null" = True results in SQL error when multiple values selected ...

1 Answer 126 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Wayde
Top achievements
Rank 1
Wayde asked on 29 May 2012, 11:15 PM
I have a multivalue parameter named "@CountryID" with the "Allow Null" property = True.  Works fine if I select the null checkbox or select a single value.  BUT, when I select multiple values I get a SQL exception.

SQL to look like this:


"select * from Countries where CountryID IN (isnull(@CountryID,CountryID))"

The error I get when I pass in MULTIPLE VALUES is ... "The isnull function requires 2 argument(s)"

I'm not sure what is happening here ... but it looks like when multiple values are specified the @CountryID isn't being set to something like "1,2,3" as I would expect.

Thanks - Wayde

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 31 May 2012, 01:28 PM
Hello Wayde,

Your question has already been answered in the other thread you've opened. Please, see our answer there for more information.

Regards,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Tags
General Discussions
Asked by
Wayde
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or