Is there a better way to check these recordsets for null values? I though I could use a loop of some sort, but the recordsets are not necessarily displayed in the same order each time they are used. Any ideas?
Code:
<%
%>
<!--#include file ="header.asp"-->
<%
on error resume next
tempforcecode = RS("force_code")
if isnull(tempforcecode) then
tempforcecode = "-"
end if
tempforcename = RS("force_name")
if isnull(tempforcename) then
tempforcename = "-"
end if
templocation = RS("force_location")
if isnull(templocation) then
templocation = "-"
end if
tempaddress = RS("address")
if isnull(tempaddress) then
tempaddress = "-"
end if
tempfirstname = rs("first_name")
if isnull(tempfirstname) then
temp firstname = "-"
end if
templastname = rs("last_name")
if isnull(templastname) then
templastname = "-"
end if
tempext = rs("extension")
if isnull(tempext) then
tempext = "-"
end if
tempmobile = rs("Mobile_Phone_Number")
if isnull(tempmobile) then
tempmobile = "-"
end if
tempoffice = rs("Office_Phone_Number")
if isnull(tempoffice) then
tempoffice = "-"
end if
tempemail = rs("email_address")
if isnull(tempemail) then
tempemail = "-"
end if
tempcontracttype = RS("Contract_Type")
if isnull(tempcontracttype) then
tempcontracttype = "-"
end if
tempdirection = RS("directions")
if isnull(tempdirection) then
tempdirection = "-"
end if
temppostcode = RS("Post_code")
if isnull(temppostcode) then
temppostcode = "-"
end if
tempfirstname = RScheck3("first_Name")
if isnull(tempfirstname) then
tempfirstname = "-"
end if
tempsurname = RScheck3("Surname")
if isnull(tempsurname) then
tempsurname = "-"
end if
tempoffice = RScheck3("Office")
if isnull(tempoffice) then
tempoffice = "-"
end if
tempofficenum = RScheck3("Office_Num")
if isnull(tempofficenum) then
tempofficenum = "-"
end if
tempmobilenum = RScheck3("Mobile_num")
if isnull(tempmobilenum) then
tempmobilenum = "-"
end if
tempemail = RScheck3("email")
if isnull(tempemail) then
tempemail = "-"
end if
tempnotes = RS("Notes")
if isnull(tempnotes) then
tempnotes = "-"
end if
tempcontractexpiry = RS("Contract_Expiry")
if isnull(tempcontractexpiry) then
tempcontractexpiry = "-"
end if
%>