global.asa
<!--==Visual InterDev Generated - startspan==-->
<!--METADATA TYPE="TypeLib" NAME="Scripting" UUID="{420B2830-E718-11CF-893D-00A0C9054228}" VERSION="1.0"-->
<!--METADATA TYPE="TypeLib" NAME="ADO" UUID="{00000200-0000-0010-8000-00AA006D2EA4}" VERSION="2.0"-->
<!--METADATA TYPE="TypeLib" NAME="CML" UUID="{23C19519-7A73-11D2-B0E3-00C04F8E7AEB}" VERSION="8.0"-->
<!--==Visual InterDev Generated - endspan==-->
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
'==Visual InterDev Generated - startspan==
'--Project Data Connection
Application("FmLib_ConnectionString") = "DSN=FmLib;UID=sa;PWD=;"
Application("FmLib_ConnectionTimeout") = 15
Application("FmLib_CommandTimeout") = 30
Application("FmLib_CursorLocation") = 3
Application("FmLib_RuntimeUserName") = "sa"
Application("FmLib_RuntimePassword") = ""
'-- Project Data Environment
Set DE = Server.CreateObject("DERuntime.DERuntime")
Application("DE") = DE.Load(Server.MapPath("Global.ASA"), "_private/DataEnvironment/DataEnvironment.asa")
'==Visual InterDev Generated - endspan==
ReadApplicationSettings
End Sub
Sub Session_OnStart
Session("LastPage") = ""
Session("BorrowerID") = 0
Set Session("_TableList") = Nothing
End Sub
Sub Session_OnEnd
Dim dctTables, key, cmd
Set dctTables = Session("_TableList")
If Not dctTables Is Nothing Then
If dctTables.Count > 0 Then
Set cmd = Server.CreateObject("ADODB.Command")
cmd.ActiveConnection = Application("FmLib_ConnectionString")
On Error Resume Next
For Each key In dctTables.Keys
cmd.CommandText = "DROP TABLE " & key
cmd.Execute
Next
End If
End If
End Sub
Sub ReadApplicationSettings()
Dim rs,fld
Set rs = Server.CreateObject ("ADODB.Recordset")
rs.Open "Settings", Application("FmLib_ConnectionString"), adOpenForwardOnly, adLockReadOnly, adCmdTable
If Not rs.EOF Then
For Each fld In rs.Fields
If LCase(fld.Name) = "debug" Then
'--- Special case for boolean value
Application("Debug") = (fld.Value = 1)
Else
Application(fld.Name) = Trim(CStr(fld.Value))
End If
Next
End If
rs.Close
Set rs = Nothing
End Sub
</SCRIPT>