Mine code that i have problem with :as you see it is very simple
<%Option Explicit%>
<!--#include File="AdoVbs.inc"-->
<!--#include File="Connections.asp"-->
<!--#include File="Skin.asp"-->
<%
Dim SQLquery, privilege,OFS,OfsFile,TacPPuserDB,TacPPuser,AdoCon
Dim UsersDB,AccountingDB,UserName,Password,ADOconn,RecordSet
Dim RegisteredTo,Footer,MetaLogout,Temp2
Dim CardFile,StrSql,Temp,logactivity,FooterMenu
' make ready for logging check
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open tacppuserDB,UserName,"letmein"
Set recordset = Server.CreateObject("ADODB.Recordset")
sqlquery="select * from tblconfig where property = 'LogActivity'"
recordset.open sqlquery,adocon
logactivity = recordSet("value")
recordSet.close
set recordSet = nothing
adocon.close
set adocon = nothing
'Function's and Subroutins
sub addTolog(LogStr)
if logactivity = "1" then
'File System For Logging
Dim FileName,strYear,StrMonth,StrDay
strYear=Year(date)
strMonth=month(date)
strDay=day(date)
if strmonth < 10 then strmonth="0"&strmonth
if strDay < 10 then strday=0&strDay
FileName="logs\"&strYear&strMonth&strDay&a mp;".txt"
Set oFS = Server.CreateObject("Scripting.FileSystemObject")
Set oFSFile = oFS.OpenTextFile(Server.MapPath(FileName),8,True)
' start Logging
oFSFile.WriteLine(Now() & " " & LogStr)
oFSFile.Close
Set oFSFile = Nothing
Set oFS = Nothing
end if
end sub
'Init Auto LogOut
Set AdoCon = Server.CreateObject("ADODB.Connection")
AdoCon.Open tacppuserDB,userName,"letmein"
Set Recordset = Server.CreateObject("ADODB.RecordSet")
SQLquery = "Select * From tblConfig Where Property = 'AutoLogOut'"
RecordSet. Open SQLquery , AdoCon
Session("AutoLogOutPage") = RecordSet.Fields("Value")
RecordSet.Close
SQLquery = "Select * From tblConfig Where Property = 'AutoLogOutTimeOut'"
RecordSet. Open SQLquery , AdoCon
Temp2 = RecordSet.Fields("Value")
temp2 = cint(temp2)
temp2 = temp2 * 60
Metalogout=" "
If Session("AutoLogOutPage") = 1 then
MetaLogOut="<meta http-equiv=""refresh"" content=""" &Temp2& ";URL=LogOut.asp?Auto=1"">"
End if
Set RecordSet = Nothing
AdoCon.Close
Set AdoCon = Nothing
%>