On Mon, 14 Jun 2004 15:25:48 -0400, DaveF <df*****@geodecisions.com> wrote:
dr.GetString(2) is Null how do I deal with that?
Line 72: Do While dr.Read
Line 73: aString = aString + CStr(dr.GetValue(0)) + ":" &
dr.GetString(1) + ":" & dr.GetString(2) + ":" + dr.GetString(3) + ":"
Line 74: Loop
You have to manually check the case that it is DbNull.Value. I usually
create a StringUtil class w/ static methods that do stuff like this ()
Public Static Function StringUtil.ToString(val as object) as string
if ((val = DbNull.value) orelse (val = null)) Then
return String.empty
else
return val.ToString()
end if
end function
sorry, haven't done vb.net in awhile, so use as a guideline...
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET