dbnull error

Topics: Developer Discussion, Help
Jun 16, 2007 at 6:20 AM
I added a new col in MemberInfo. When I try to bring up the member info, I get a dbnull error. I've been trying various things, but no fix is working. How can I catch this exception?
Jun 16, 2007 at 2:47 PM
How are you getting the DBNull error? Did you add a column and then you get a DBNull? You can't really avoid it. All columns in member info need to be filled out.
Jun 16, 2007 at 7:09 PM
But they're not all required fields, right? The user doesn't have to provide a name, for example. When the record updates I see it's putting SOMEthing in there, even if it's just a space, whereas the new column actually reads NULL.

I would think some kind of null handling would need to occur somewhere or you could never add a new column post-production without updating all the records.

I'll fill something in the field and come back to it later. It's a very frustrating issue to resolve. Like I said, my background is Cold Fusion, Oracle (and further back, c++). I've only been looking at vb for about a week. Obviously I haven't figured out its quirks yet, lol.
Jun 16, 2007 at 7:45 PM
Actually, they are required because of the DAL class that ships with the kit. The DAL class won't take nulls. I'm not sure where null checking could be applied, but you would put this somewhere to check for the null

If IsDBNull(STRING) = True Then
'It's null
'It isn't null
End If
Jun 21, 2007 at 6:03 AM
On the most recent builds, you do not have to have them required. Just remember to put in the null statements and output "" if they are null.