Invalid parameters
") Response.End End If ' Build query based on device type Select Case LCase(deviceType) Case "idf" strSQL = "SELECT mapleft, maptop, idfname AS devicename FROM idfs WHERE idfid = " & CLng(deviceId) Case "server" strSQL = "SELECT mapleft, maptop, servername AS devicename FROM servers WHERE serverid = " & CLng(deviceId) Case "switch" strSQL = "SELECT mapleft, maptop, switchname AS devicename FROM switches WHERE switchid = " & CLng(deviceId) Case "camera" strSQL = "SELECT mapleft, maptop, cameraname AS devicename FROM cameras WHERE cameraid = " & CLng(deviceId) Case "accesspoint", "access point" strSQL = "SELECT mapleft, maptop, apname AS devicename FROM accesspoints WHERE apid = " & CLng(deviceId) Case Else Response.Write("Unknown device type
") Response.End End Select Set rs = objConn.Execute(strSQL) If Not rs.EOF Then mapleft = rs("mapleft") maptop = rs("maptop") deviceName = rs("devicename") ' Check if location is set If IsNull(mapleft) Or IsNull(maptop) Or mapleft = "" Or maptop = "" Then %>No location set for this device
Device not found