Page 1 of 1

How do I pass null to an SQL parameter

Posted: Mon Nov 03, 2008 6:12 am
by JakobChristensen
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

How do I pass null to an SQL parameter

Posted: Mon Nov 03, 2008 9:16 am
by Edward
Hello, Jakob.

The workaround is here:

http://forum.stimulsoft.com/Default.aspx?g=posts&t=504

Thank you.