I think I sww where you're going with this but I've already changed it
to one of Marina Levit's ideas.
Also I'm not sure how all this would fit in with, result is declared as
an object. My intention was to declare result as a string but it turns
out when there is nothing to put in it instead of it getting a null
string it gets dbnull. arrrrgh! So now result is a object and I can
check to see if it's dbnull if not it's a string. Seems to work. So
perhaps I can finish this darn program now.
pvdg42 wrote:
"cj" <cj@nospam.nospam> wrote in message
news:Oa**************@TK2MSFTNGP11.phx.gbl... in the command window I get:
? result
{System.DBNull}
[System.DBNull]: {System.DBNull}
I need to check for this in code. I then tested in the command window
if result = system.DBNull
'DBNull' is a type and cannot be used as an expression.
How can I check to see if result is equal system.dbnull in my code?
Perhaps this will help:
Visual Basic (Declaration)
Public Shared Function IsDBNull ( _
value As Object _
) As Boolean
Visual Basic (Usage)
Dim value As Object
Dim returnValue As Boolean
returnValue = Convert.IsDBNull(value)