Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6688 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'   gotoLatestInRelease.asp
5
'   
6
'   This page will redirect the user the current version of a package within a release
7
'   It may be used to provide a dynamic link to a user
8
'
9
'   Requires: rtag_id=nnn
10
'             pv_id=nnn
11
'   Optional: page=name
12
'=====================================================
13
%>
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/common_subs.asp"-->
18
<%
19
Dim Query_String
20
Dim pvId
21
Dim parPage
22
Dim url
23
 
24
parPage = RequestDefault("page", "dependencies.asp")
25
 
26
OraDatabase.Parameters.Add "PV_ID",     DB_PV_ID,   ORAPARM_INPUT, ORATYPE_NUMBER
27
OraDatabase.Parameters.Add "RTAG_ID",   DB_RTAG_ID, ORAPARM_INPUT, ORATYPE_NUMBER
28
 
29
Query_String = "select rc.pv_id from" &_
30
               " release_content rc, PACKAGE_VERSIONS pv" &_
31
               " WHERE rc.rtag_id = :RTAG_ID" &_
32
               " and rc.PV_ID = pv.pv_id" &_
33
               " and pv.pkg_id = ( select pkg_id from PACKAGE_VERSIONS where pv_id = :PV_ID)" &_
34
               " and NVL(pv.V_EXT,'.NULL') = ( select NVL(v_ext,'.NULL') from PACKAGE_VERSIONS where pv_id = :PV_ID)"
35
 
36
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
37
If rsTemp.RecordCount > 0 Then
38
    pvId = (rsTemp.Fields("pv_id"))
39
End If
40
 
41
OraDatabase.Parameters.Remove "PV_ID"
42
OraDatabase.Parameters.Remove "RTAG_ID"
43
 
44
url = parPage & "?rtag_id=" & DB_RTAG_ID & "&pv_id=" & pvId
45
 
46
Response.Redirect url
47
%>