<%@LANGUAGE="VBSCRIPT"%> <% '===================================================== '| | '| _DeleteDaemonInstruction | '| | '===================================================== %> <% Option explicit Response.Expires = 0 %> <% '------------ ACCESS CONTROL ------------------ %> <% '------------ VARIABLE DEFINITION ------------- Dim rFile '------------ CONSTANTS DECLARATION ----------- '------------ VARIABLE INIT ------------------- rFile = request("rfile") '------------ CONDITIONS ---------------------- '---------------------------------------------- %> <% '-------------------------------------------------------------------------------------------------------------------------- Sub RemoveDaemonInstruction () On Error Resume Next If NOT DaemonInstructionInProgress(Request("inst_id")) Then objEH.TryORA ( OraSession ) OraDatabase.ExecuteSQL "BEGIN PK_BUILDAPI.del_daemon_inst("& Request("inst_id") & "); END;" objEH.CatchORA ( OraSession ) Else Call RaiseMsg(enum_MSG_ERROR, "Cannot delete an instruction that is currently being processed by a Daemon") End If End Sub '-------------------------------------------------------------------------------------------------------------------------- Sub RemoveDaemonInstructionByPVID () On Error Resume Next If NOT DaemonInstructionInProgress(Request("inst_id")) Then objEH.TryORA ( OraSession ) OraDatabase.ExecuteSQL _ "BEGIN PK_BUILDAPI.del_daemon_inst_by_rtag_pvid("& Request("opCode") & "," & Request("rtag_id") & "," & Request("pv_id") & "); END;" objEH.CatchORA ( OraSession ) Else Call RaiseMsg(enum_MSG_ERROR, "Cannot delete an instruction that is currently being processed by a Daemon") End If rFile = rFile & "?rtag_id=" & Request("rtag_id") & "&pv_id=" & Request("pv_id") End Sub '-------------------------------------------------------------------------------------------------------------------------- %> <% '**************************** M A I N ****************************** ' --- Form is Valid --- If Request("opCode") <> "" Then Call RemoveDaemonInstructionByPVID() ElseIf Request("inst_id") <> "" Then Call RemoveDaemonInstruction() End If If objEH.Finally Then Call OpenInWindow ( rFile ) End If '********************************************************************** %> <% '------------ RUN AFTER CODE RUN -------------- '---------------------------------------------- '---------------------------------------------- Call Destroy_All_Objects %>