|
-
Sep 13th, 2010, 11:32 AM
#1
Thread Starter
PowerPoster
refresher on VB6 Null handling
Hello -
I am tasked with updating a legacy VB6 process that writes out a text file from a SQL Server table. This program uses equal / not equal operators to test for Null, which I always thought was a no-no. (I always used the IsNull function.)
They do things like:
If rsTable!SomeField = Null Then ...
and
If rsTable!SomeField <> Null Then ...
The "=" seems to be OK, but the "<>" seems to be causing a problem (i.e., the output is always empty for the field being tested with "<> Null").
Before I do the surgery, I'd like a second opinion, or confirmation on this: "FieldName <> Null" will always return False, whether or not the database field is actually null?
Thanks, guys ...
"It's cold gin time again ..."
Check out my website here.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|