is nothing

  • Thread starter Thread starter SimonZ
  • Start date Start date
S

SimonZ

I have function:
Protected Function func(byVal param as object)

My param is null ( I get system.dbnull from database)

But when I check:

If not param is nothing then
'this is always executed
end if

my if is executed.

Why?

if param = null than is nothing should work?

thanks,S
 
Because null and System.DBNull are two different things. You should check param for not being equal to System.DBNull.

Eliyahu
I have function:
Protected Function func(byVal param as object)

My param is null ( I get system.dbnull from database)

But when I check:

If not param is nothing then
'this is always executed
end if

my if is executed.

Why?

if param = null than is nothing should work?

thanks,S
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top