I'm sure someone's come across this, but I couldn't find it searching
the boards.

I get the error message "Invalid use of Is operator in query
expression" when I use the IS operator and a variable. For example:

I have the following SQL statement in a dataset:
SELECT *
FROM Scholarship
WHERE scholarshipID IS @ScholarshipID

Then I have the following MM variable:

<Parameter Name="@ScholarshipID" Value='<%# system.dbnull.value %>'
Type="Integer" />

What I've tried:

1. Used same SQL statement, but used a literal instead of a variable
(WHERE scholarshipID IS NULL). This worked fine, but I need to have a
variable as I'll be getting either a NULL or NOT NULL value from a form
element.

2. Used same SQL statement, but used NULL instead of
system.dbnull.value. This brought up that "BC30822: 'NULL' is not
declared. 'Null' constant is no longer supported; use 'System.DBNull'
instead." error message.


Can you use the IS operator followed by a Parameter as I outlined in my
SQL above?

Hopefully this is an easy one for somebody to answer.

Thanks,
Jeremy