Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 327
  • Last Modified:

tableadapter date column checking for null

When I try to retrieve if a date value is nothing, it errors saying the value is DBNull.

                If Not member(0).M_Creation_Date = Nothing Then _
                    creationDate = member(0).M_Creation_Date

if I do this:
If Not member(0).M_Creation_Date Is DBNull.Value Then

It says Is requires operands that have reference types. what do I put there to check if a date is null? thanks.

0
Starr Duskk
Asked:
Starr Duskk
1 Solution
 
Starr DuskkASP.NET VB.NET DeveloperAuthor Commented:
I found the answer:

If Not member(0).IsM_Creation_DateNull Then

There's a little drop down list of "is" checks for "null"
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now