Charlotte Foust
cfoust at infostatsystems.com
Tue Jun 13 10:46:26 CDT 2006
I hadn't noticed that you were using a session variable, but in your
code, you were setting the ItemAmt to "100" so ItemAmt looks like a
string variable. It would never be null in that case. It would either
be nothing (uninitialized, one of the pitfalls in .Net) or String.Empty
("")
Charlotte
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David Emerson
Sent: Monday, June 12, 2006 9:46 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] vb.Net - Checking for NULL values
Thanks. While neither of those worked either it prompted me to try this
which did:
If Session("ItemAmt") = "" Then
Maybe it is something to do with the way session variables work???
David
At 13/06/2006, Stuart wrote:
>On 13 Jun 2006 at 16:09, David Emerson wrote:
>
> > Hi Darren,
> >
> > My code is not in SQL but in VB.net. It doesn't recognise Is Null
> > either.
>
>Try either:
> Dim MyNull As System.DBNull
> ...
> If Session("ItemAmt") Is MyNull Then
>
>or:
> If Session("ItemAmt") Is Nothing Then
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com