Subversion Repositories DevTools

Rev

Rev 5512 | Rev 6265 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5512 Rev 5959
Line 37... Line 37...
37
        rv = rv & "../"
37
        rv = rv & "../"
38
    Next
38
    Next
39
    GetPathToBase = rv
39
    GetPathToBase = rv
40
End Function
40
End Function
41
 
41
 
-
 
42
'-----------------------------------------------------------------------------------------------------------------------------
-
 
43
'   Destroy_All_Objects
-
 
44
'   Should be used by ALL pages and error handling code in order to reduce memory and handle leaks
-
 
45
'   May be used directly or via _footer.asp or globals_destructor.asp
-
 
46
Sub Destroy_All_Objects
-
 
47
    On Error Resume Next
-
 
48
    '   Some global objects
-
 
49
    Set objAccessControl = Nothing
-
 
50
    Set objPMod = Nothing
-
 
51
    Set objEH = Nothing
-
 
52
    Set objTabControl = Nothing
-
 
53
    Set objBtnControl = Nothing
-
 
54
    Set objFormCollector = Nothing
-
 
55
 
-
 
56
    '   Delete ALL Oracle bound variables
-
 
57
    '   Note: Bound Variables that remain at the end of a Page Process will cause an Oracle Session leak
-
 
58
    If TypeName(OraDatabase) = "IOraDatabase" Then
-
 
59
        While OraDatabase.Parameters.Count > 0
-
 
60
            OraDatabase.Parameters.Remove(0)
-
 
61
        Wend
-
 
62
    End  If
-
 
63
 
-
 
64
    '   Some commonly used database objects
-
 
65
    rsTemp.Close
-
 
66
    Set rsTemp = Nothing
-
 
67
 
-
 
68
    rsRep.Close
-
 
69
    Set rsRep = Nothing
-
 
70
 
-
 
71
    rsQry.Close
-
 
72
    Set rsQry = Nothing
-
 
73
 
-
 
74
    '   Database objects
-
 
75
    set OraDatabase = Nothing
-
 
76
    set OraSession = Nothing
-
 
77
End Sub
-
 
78
 
42
' -- DATABASE CONNECTIONS -----------------------------
79
' -- DATABASE CONNECTIONS -----------------------------
43
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
80
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
44
Set OraDatabase = OraSession.OpenDatabase( Application("TNS_NAME"), Application("ACCESS_MANAGER_LOGIN"), Cint(0))
81
Set OraDatabase = OraSession.OpenDatabase( Application("TNS_NAME"), Application("ACCESS_MANAGER_LOGIN"), Cint(0))
45
 
82
 
46
' -- CONFIGURATIONS -----------------------------------
83
' -- CONFIGURATIONS -----------------------------------