Subversion Repositories DevTools

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'   gotoLatestInRelease.asp
'   
'   This page will redirect the user the current version of a package within a release
'   It may be used to provide a dynamic link to a user
'
'   Requires: rtag_id=nnn
'             pv_id=nnn
'   Optional: page=name
'=====================================================
%>
<!--#include file="common/conf.asp"-->
<!--#include file="common/globals.asp"-->
<!--#include file="common/qstr.asp"-->
<!--#include file="common/common_subs.asp"-->
<%
Dim Query_String
Dim pvId
Dim parPage
Dim url

parPage = RequestDefault("page", "dependencies.asp")

OraDatabase.Parameters.Add "PV_ID",     DB_PV_ID,   ORAPARM_INPUT, ORATYPE_NUMBER
OraDatabase.Parameters.Add "RTAG_ID",   DB_RTAG_ID, ORAPARM_INPUT, ORATYPE_NUMBER

Query_String = "select rc.pv_id from" &_
               " release_content rc, PACKAGE_VERSIONS pv" &_
               " WHERE rc.rtag_id = :RTAG_ID" &_
               " and rc.PV_ID = pv.pv_id" &_
               " and pv.pkg_id = ( select pkg_id from PACKAGE_VERSIONS where pv_id = :PV_ID)" &_
               " and NVL(pv.V_EXT,'.NULL') = ( select NVL(v_ext,'.NULL') from PACKAGE_VERSIONS where pv_id = :PV_ID)"

Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
If rsTemp.RecordCount > 0 Then
    pvId = (rsTemp.Fields("pv_id"))
End If

OraDatabase.Parameters.Remove "PV_ID"
OraDatabase.Parameters.Remove "RTAG_ID"

url = parPage & "?rtag_id=" & DB_RTAG_ID & "&pv_id=" & pvId

Response.Redirect url
%>