Quote:
|
Originally Posted by Teddy
That logic is dangerous in general. You can get away with it in certain languages, but you'll find yourself scratching your head when rs("field1") & "" comes back null as you move ahead. It's also confusing to programmers who come in behind you and have to decide what your intent was by concatenating a zero length string to a random field.
But then, I'm nitpicky like that.
|
True , True
Normaly i would use
String.IsNullOrEmpty(y) in .Net
or in
VB IsEmpty(x) / IsNothing or IsNULL depending what i was expecting
but in his example he's allready assigning it to a non specified value
' Dim empVal, empVal1, num
without perceding check (so i thought what the heck)
and afterwords he's checking on an empty string
' If ( (empVal = "") AND....
if this is his check, my previus example will work
And if you ask out recordset("Name") & ""
and the rs is Null it will return "" in
VB
if rs isn't nothing
don't know if it will do the same in C++