This is what I have now, but i keep on getting the error "not a valid filename". The line that is in red is the line that the error is pointing too.
Code:
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
'sets up the connection to the databases needed in the script
Sub Application_OnStart
' Set our user count to 0 when we start the server
Application("ActiveGuests") = 0
End Sub
Sub Session_OnStart
' Checks to see if the user is already logged in
If Session("TDCUser") = "" Or Request.Cookies("TDCUser") = "" Then
Application.Lock
Application("ActiveGuests") = Application("ActiveGuests") + 1
Application.UnLock
End If
If Session("TDCUser") = "" Then
If Request.Cookies("TDCUser") <> "" Then
Dim ObjConn : ObjConn = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=http://www.topdeckcards.com/fpdby/database.mdb"
Dim CheckUser : Set CheckUser = Server.CreateObject("ADODB.RecordSet")
CheckUser.Open "Select * From UserStats Where UserName='"&Request.Cookies("TDCUser")&"'",ObjConn,1,2
Session("TDCUser") = CheckUser("UserName")
Session("TDCGroup") = CheckUser("GroupID")
End If
End if
End Sub
Sub Session_OnEnd
' Decrease the active visitors count when the session ends.
If Session("TDCUser") <> "" Then
Dim ObjConn : ObjConn = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=http://www.topdeckcards.com/fpdby/database.mdb"
Dim UpdateUser : Set UpdateUser = Server.CreateObject("ADODB.RecordSet")
UpdateUser.Open "Select * From UserStats Where UserName="&Session("TDCUser"),ObjConn,1,2
UpdateUser("LoggedIn") = False
UpdateUser.Update
UpdateUser.Close
Set UpdateUser = Nothing
Else
Application.Lock
Application("ActiveGuests") = Application("ActiveGuests") - 1
Application.UnLock
End If
End Sub
</SCRIPT>