
Illegal use of Null Values !^&*$@^&*^$&*
Quote:
>Hello all
>I keep breaking my teeth on this error message when I try to pass to a
>function a dynaset field that appears to be Null.
>Let be more explicit. Creating a print routine (with the printer
>object) from the content of a dynaset, it prints #NULL# is the value is
>null which is not pretty. So I've made a routine NONULL (astring) as
>string that is meant to return a blank in case astring is null.
>But it doesn't go that far and keeps returning this "Illegal use of Null
>Value" !!
I like to be tidy about sorting out VB type problems (Try Dephi,
you'll like it) so my "include this with everything" library has this
function:
function mkstring(s as variant) as string
if isnull(s) then
mkstring = ""
else
mkstring = s
end if
Then, whenever I move data between variants and strings, i put
mkstring(foo).
Variants:What are they for? Why do we need them?
pointless, i know, if VB had typing, but...
Sid/