4 replies
by eamonn_casey
wasNull is terrible!
1. wasNull is AFTER you read the data, so you must place the eventual assignment after the check for wasNull to avoid NULL being assigned.
2. I think that this is the only wasXXX() function in the SDK. Try finding it when all of the other functions are called isXXX()
by java guru
1) I prefer to not allow nulls into the DB.
2) use isnull() in the DB
3) solve in the middle tier via (if, wasnull, etc).
I think solving it in the middle tier is the least desireable. Having null values floating around can only cause trouble. I usually design them away in the beginning.
by dave_rabone
1) I'd love a db without null in there. Lots of NOT NULLs
are nice, but legacy databases or differing opinions can
mean otherwise.
2) I hate to use database functions as I've never found
them very independent. Nicer to have a reusable db
layer with wasNulls.
3) Agreed that this is a pain, I'd go 1, then 3 then 2.
Unless it's specific code, in which case 1, 2, 3.
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending