is nothing

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
 
E

Eliyahu Goldin

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

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,241
Latest member
Lisa1997

Latest Threads

Top