Android Question null to zero vb equivalnet nz

I didn't even know VB had that, after working with it since 3.0 was released. I've used my own NullToZero and NullToEmptyString instead...

As soon as you work with databases, chances are that nulls will occur.

So, some null handling is quite useful to have.
 
Upvote 0
It's not that hard to make your own:

Code: Copy
Sub NullToZero(Value as float) as float
  If Value = null Then
    Return 0
  Else
    Return Value
  End If
End Sub

...or something along those lines (can't syntax check it now).
 
Upvote 0
Back
Top