<% Dim theme theme = Request.Cookies("theme") IF theme = "" THEN theme="bg-theme1" END IF Dim switchid, rs, switchname switchid = 5411 Dim strSQL strSQL = "SELECT mac.alias AS switchname FROM machines mac WHERE mac.machineid = " & switchid Set rs = objConn.Execute(strSQL) If Not rs.EOF Then If Not IsNull(rs("switchname")) Then switchname = rs("switchname") Else switchname = "" Else switchname = "NOT FOUND" End If rs.Close Set rs = Nothing %>

Test With Includes

Switch Name: <%=Server.HTMLEncode(switchname)%>

<% objConn.Close %>