%@LANGUAGE="VBSCRIPT"%>
<%
Option explicit
Response.Expires = 0 ' always load the page, dont store
%>
<%
'=====================================================
' Obsolete Patch
'=====================================================
%>
<%
'------------ ACCESS CONTROL ------------------
%>
<%
'------------ Variable Definition -------------
Dim parPv_id
Dim objFormComponent
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
parPv_id = QStrPar("pv_id")
Set objFormComponent = New FormComponent
'----------------------------------------------
%>
<%
Function Get_Comments( NNPv_id )
Dim rsTemp, Query_String
Query_String = _
" SELECT obsolete_comments"&_
" FROM package_versions"&_
" WHERE pv_id = "& NNPv_id
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
Get_Comments = rsTemp.Fields("obsolete_comments")
End If
rsTemp.Close
Set rsTemp = nothing
End Function
Sub SubmitObsoleteComments ( NNPv_id )
Dim isPatchObsolete
isPatchObsolete = "Y"
If Request("unobsolete") <> "" Then
isPatchObsolete = NULL
End If
objEH.TryORA ( OraSession )
On Error Resume Next
If Request("FRpatch_id") <> "" Then
OraDatabase.ExecuteSQL _
" UPDATE PACKAGE_PATCHES SET"&_
" PATCH_OBSOLETED_BY =" & Request("FRpatch_id")&_
" WHERE PATCH_ID = "& Request("pv_id")
Else
OraDatabase.ExecuteSQL _
" UPDATE PACKAGE_PATCHES SET"&_
" PATCH_OBSOLETED_BY = NULL"&_
" WHERE PATCH_ID = "& Request("pv_id")
End If
OraDatabase.Parameters.Add "PATCH_ID", Request("pv_id"), ORAPARM_INPUT, ORATYPE_NUMBER
OraDatabase.Parameters.Add "IS_OBSOLETE", isPatchObsolete, ORAPARM_INPUT, ORATYPE_CHAR
OraDatabase.Parameters.Add "OBSOLETE_COMMENTS", Request("obsolete_comments"), ORAPARM_INPUT, ORATYPE_VARCHAR2
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
If Err.Number = 0 Then
OraDatabase.ExecuteSQL _
" BEGIN PK_PACKAGE.OBSOLETE_PATCH ( :PATCH_ID, :IS_OBSOLETE, :OBSOLETE_COMMENTS, :USER_ID ); END;"
End If
objEH.CatchORA ( OraSession )
OraDatabase.Parameters.Remove "PATCH_ID"
OraDatabase.Parameters.Remove "USER_ID"
OraDatabase.Parameters.Remove "IS_OBSOLETE"
OraDatabase.Parameters.Remove "OBSOLETE_COMMENTS"
End Sub
%>
<%
'Process submition
'------------ Action Requirements -------------------
If CBool(QStrPar("action")) AND objAccessControl.UserLogedIn Then
Call SubmitObsoleteComments ( Request("pv_id") )
Call OpenInParentWindow ( Request("rfile") &"?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
Call CloseWindow
End If
%>
Release Manager
<%
'-- FROM START ---------------------------------------------------------------------------------------------------------------
objFormComponent.FormName = "FormSearch"
objFormComponent.Action = scriptName
Call objFormComponent.FormStart()
%>
<%
Call objFormComponent.FormEnd()
'-- FROM END ----------------------------------------------------------------------------------------------------------------
%>