%@ Language="VBScript" %> <% On error resume next Public rsMedication Public cnDB Public Condition If isEmpty(Session("SubscriberID")) then Session("ErrMsg") = "Your connection has expired" Response.Redirect "Login.asp" elseIf Session("SubscriberID") = 0 then Session("ErrMsg") = "Your connection has expired" Response.Redirect "Login.asp" End if '-- Buttons If Request.Form("btnSubscriber") = "Subscriber" then Response.Redirect "Subscriber.asp" End if If Request.Form("btnCondition") = "Condition" then Response.Redirect "Condition.asp" End if If Request.Form("btnAllergies") = "Allergies /" & Chr(13) & Chr(10) & " Inoculations" then Response.Redirect "Allergies.asp" End if If Request.Form("btnPhysician") = "Physicians /" & Chr(13) & Chr(10) & " Provider" then Response.Redirect "Physician.asp" End if If Request.Form("btnNote") = "Notes" then Response.Redirect "Note.asp" End if Condition = Request.QueryString("C") Session("ErrMsg") = "" Err.Clear Set cnDB = CreateObject("ADODB.Connection") cnDB.ConnectionString = Session("dbConnection") cnDB.Open If Err.number = 0 then If len(Condition) > 0 then Set rsMedication = cnDB.Execute("SELECT * FROM tblSubscriber_Medication" & _ " WHERE Deleted<>Yes" & _ " AND SubscriberID=" & Session("SubscriberID") & _ " AND conditionID=" & Condition & _ " AND Deleted<>Yes;") Else Set rsMedication = cnDB.Execute("SELECT * FROM tblSubscriber_Medication" & _ " WHERE Deleted<>Yes" & _ " AND SubscriberID=" & Session("SubscriberID") & _ " AND Deleted<>Yes;") End if End if If rsMedication.eof then End if %>