dbnull: checking for null
I have a few records in one of my tables that have nulls in a DateTime field. I am querying this DateTime field and checking it against the current time and using this is a Decision flow in my workflow. Unfortunately, if there is a null in the field, the workflow errors out. I am trying to construct a Decision activity above this point in the workflow to make sure that the null dates are handled in another way (the true side of the decision). I have tried to use dbnull.value(myVariable) to no avail in the VB expression of the Decision activity. I have also tried IsDBNull and that hasn't worked either. Any suggestions?
-
I realized that I should just put the activity that was causing the error condition into a Try-Catch activity. I could then deal with the exception as needed without worrying about how to use dbnull, var is nothing, or var = nothing.
0
Please sign in to leave a comment.
Comments
1 comment