Basically, I need to avoid either..
-----Original Message----- From: Ken Schaefer [mailto:[EMAIL PROTECTED]] Sent: October 15, 2002 9:08 PM To: ActiveServerPages Subject: Re: Avoiding Empty Records Empty <> Null The following code: : If rs("Fee") <> "" then does *not* check for Null. It checks for a zero length string. You can use COALESCE() or ISNULL() or similar in your SQL to return a value in place of the NULL, or you can use VBScript's IsNull() function. That said, you seem to be testing for zero length strings, not Null values. Cheers Ken ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From: <[EMAIL PROTECTED]> Subject: Avoiding Empty Records : I'm using the below code to add a row with information if the database : contains any, but sometimes I get info, others, an empty row, others, no row : at all.. : : There must be a better way to ensure that the database field is actually : empty, VBNull ???? : : if rs("Fee") <> "" then : response.write "<tr>" & vbcrlf : response.write "<font size='2' face='Arial'>" & vbcrlf : response.write "<td valign='top'><p align='right'>Fee:</font></td>" & vbcrlf : response.write "<td><p align='left'><font size='2' face='Arial' : Color='Black'>" & rs("Fee") & "</font></td>" & vbcrlf : response.Write"</tr>" & vbcrlf : end if : : : Tim : : : --- : You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] : To unsubscribe send a blank email to %%email.unsub%% --- You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
