Archive for January, 2008
Null or Not Null
That is the question…
I am working on an old Visual Basic project. It is not my own, it’s just an existing project in which I have to make some changes. There’s an existing database connection and in one of “my” functions, I have run a query, and created a recordset (rs). In a loop, I am iterating through the records with a bit of code like this:
If Not IsNull(rs!X) Then
strX = rs!X
Else
strX = ""
End If
or, if you like
strX = IIf(IsNull(rs!X), "", rs!X)
Somehow, I get an error, “Invalid use of Null”, on the second line! So, rs!X is Null on the second line, but it wasn’t on the first line, or else the code would never have come to the second line! How is this possible?!?
A bit quiet lately
It’s been a bit quiet here, lately. On my weblog, that is.
I (we) have been very busy with work, with our search for a new house, my parents moving, and with Marijn, of course.
Anyway, just the other day, I found out that since my weblog has been moved to WordPress, all internal links on my weblog are broken. All links still point to cpbotha.net. I plan to fix them all, but please be patient with me.
Search
Recent Posts
Categories
- Computing (64)
- Funny (38)
- Interesting (11)
- Leisure (38)
- Movies (12)
- Personal (73)
- Photography (10)
