How do I pass null to an SQL parameter

Stimulsoft Reports.NET discussion
Post Reply
JakobChristensen
Posts: 2
Joined: Mon Nov 03, 2008 6:06 am
Location: Denmark

How do I pass null to an SQL parameter

Post 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
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How do I pass null to an SQL parameter

Post by Edward »

Hello, Jakob.

The workaround is here:

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

Thank you.
Post Reply