<OBJECT ID=”agobjOraSession” RUNAT=”Server” PROGID=”OracleInProcServer.XOraSession” SCOPE=”Application”>
</OBJECT>
<script LANGUAGE=VBScript RUNAT=Server>
Const CONST_FL_NAME = “\GetAttributeCode.ini”
Const CONST_FL_FORREADING = 1
Const CONST_DB_SECTION = “[DB_CONNECTION]”Sub Application_OnStart
On Error Resume Next
ÃÂ Dim objFsÃÂ ÃÂ ÃÂ
ÃÂ Dim objTsÃÂ ÃÂ ÃÂ ÃÂ ÃÂ
ÃÂ Dim strLineDataÃÂ ÃÂ ÃÂ
ÃÂ Dim flgSectionÃÂ ÃÂ ÃÂ
ÃÂ Dim strTempDataÃÂ
ÃÂ Application(“Service”) = “”
ÃÂ Application(“User”) = “”
àstrLineData = “”ÃÂ
ÃÂ strTempData = “”
ÃÂ flgSection = False
ÃÂ Set objFs = Server.CreateObject (“Scripting.FileSystemObject”)
ÃÂ Set objTs = objFs.OpenTextFile(Server.MapPath(CONST_FL_NAME),CONST_FL_FORREADING,False)
ÃÂ If Err.Number <> 0 Then
àãÂÂãÂÂErr.Clear
ààãÂÂSet objTs = Nothing
àãÂÂãÂÂSet objFs = Nothing
àãÂÂãÂÂExit Sub
ÃÂ End If
While Not objTs.AtEndOfStream
ÃÂ ÃÂ strLineData = objTs.ReadLine
àãÂÂIf Trim(strLineData) <> “” Then
ÃÂ ÃÂ ÃÂ ÃÂ If flgSection = True And Mid(strLineData,1,1) = “[” And _
àààãÂÂãÂÂMid(strLineData,Len(strLineData),1) = “]” Then
ààãÂÂãÂÂãÂÂobjTs.Close
ààààãÂÂSet objTs = Nothing
ààãÂÂãÂÂãÂÂSet objFs = Nothing
ààãÂÂãÂÂãÂÂExit Sub
ààãÂÂãÂÂEnd If
ààãÂÂãÂÂIf strLineData = CONST_DB_SECTION Then
ààãÂÂãÂÂãÂÂflgSection = True
àãÂÂã End Ifxml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /??
ÃÂ
If flgSection = True Then
ÃÂ ÃÂ ÃÂ If Mid(strLineData,1,7) = “Service” Then
àààãÂÂãÂÂstrTempData = Trim(Mid(strLineData,8,Len(strLineData)-7))
àààãÂÂãÂÂIf Mid(strTempData,1,1) = “=” Then
àààãÂÂãÂÂãÂÂãÂÂstrTempData = Trim(Mid(strTempData,2,Len(strTempData)-1))
àààãÂÂãÂÂãÂÂãÂÂApplication.Lock
àààãÂÂãÂÂãÂÂã Application(“Service”) = Mid(strTempData,2,Len(strTempData)-2)
àààãÂÂãÂÂãÂÂãÂÂApplication.UnLock
ààãÂÂã End If
ÃÂ ÃÂ End If
ÃÂ ÃÂ If Mid(strLineData,1,4) = “User” Then
àààãÂÂãÂÂstrTempData = Trim(Mid(strLineData,5,Len(strLineData)-4))
àààãÂÂãÂÂIf Mid(strTempData,1,1) = “=” Then
àààãÂÂãÂÂstrTempData = Trim(Mid(strTempData,2,Len(strTempData)-1))
àààãÂÂãÂÂApplication.Lock
àààãÂÂãÂÂApplication(“User”) = Mid(strTempData,2,Len(strTempData)-2)
àààãÂÂãÂÂApplication.UnLock
ÃÂ ÃÂ ÃÂ End If
End If
End If
End If
Wend
objTs.Close
Set objTs = Nothing
Set objFs = Nothing
End Sub
</script>
ÃÂ
ÃÂ
[1]