How do I pass null to an SQL parameter
Posted: Mon Nov 03, 2008 6:12 am
I have an SQL data source like this:
select
Count(*) as Total
from
Session
where
Session.GlobalVisitNo = @GlobalVisitNo or @GlobalVisitNo is null
where @GlobalVisitNo is an SQL Parameter.
I would like to pass either a number or null in this parameter.
As far as I can see, the StiDataParameter does not allow to set an IsNullable flag.
Any ideas?
Best regards
Jakob Christensen
select
Count(*) as Total
from
Session
where
Session.GlobalVisitNo = @GlobalVisitNo or @GlobalVisitNo is null
where @GlobalVisitNo is an SQL Parameter.
I would like to pass either a number or null in this parameter.
As far as I can see, the StiDataParameter does not allow to set an IsNullable flag.
Any ideas?
Best regards
Jakob Christensen