Ny fejl i global.asa
Ja har man løst den ene kommer en ny...Fejlmeddelelse:
Microsoft OLE DB Provider for ODBC Drivers fejl '80040e07'
[Microsoft][ODBC Microsoft Access-driver] Datatyperne stemmer ikke overens i kriterieudtrykket.
global.asa, linje 44
linie 44: Set RSRecordID = Conn.Execute("select RecordID from Visitors where DateTimeEntrance = '"_
Koden:
<Script Language=VBScript RUNAT="server">
Sub Session_OnStart
Connection = "PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("statistik.mdb") & ";UID=admin;PWD=;"
set conn = server.CreateObject ("adodb.connection")
Conn.Open Connection
set BC = server.createobject("MSWC.BrowserType")
DateTimeEntrance = Now()
IPAddress = Request.ServerVariables ("remote_addr")
UserAgent = Request.ServerVariables ("HTTP_USER_AGENT")
Browser = BC.Browser & " " & BC.Version
DHTMLSupport = cstr(BC.dhtml)
FramesSupport = cstr(BC.frames)
TablesSupport = cstr(BC.tables)
CookiesSupport = cstr(BC.cookies)
BackgroundSounds = cstr(BC.backgrounds)
JavaScriptSupport = cstr(BC.javascript)
JavaAppletsSupport = cstr(BC.javaapplets)
ActiveXControlsSupport = cstr(BC.activexcontrols)
AOL = cstr(BC.aol)
Platform = cstr(BC.platform)
VBScriptSupport = cstr(BC.vbscript)
SQL = "insert into Visitors (DateTimeEntrance, IPAddress, UserAgent, Browser, "
SQL = SQL & "DHTML, Frames, Tables, Cookies, BackgroundSounds, Javascript, "
SQL = SQL & "JavaApplets, ActiveXControls, AOL, Platform, VBScript) values ("
SQL = SQL & "'" & DateTimeEntrance & "', "
SQL = SQL & "'" & IPAddress & "', "
SQL = SQL & "'" & UserAgent & "', "
SQL = SQL & "'" & Browser & "', "
SQL = SQL & "'" & DHTMLSupport & "', "
SQL = SQL & "'" & FramesSupport & "', "
SQL = SQL & "'" & TablesSupport & "', "
SQL = SQL & "'" & CookiesSupport & "', "
SQL = SQL & "'" & BackgroundSounds & "', "
SQL = SQL & "'" & JavaScriptSupport & "', "
SQL = SQL & "'" & JavaAppletsSupport & "', "
SQL = SQL & "'" & ActiveXControlsSupport & "', "
SQL = SQL & "'" & AOL & "', "
SQL = SQL & "'" & Platform & "', "
SQL = SQL & "'" & VBScriptSupport & "')"
Conn.Execute SQL
Set RSRecordID = Conn.Execute("select RecordID from Visitors where DateTimeEntrance = '"_
& DateTimeEntrance & "'")
Session("RecordID") = clng(RSRecordID("RecordID"))
End Sub
Sub Session_OnEnd
Connection = "PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("statistik.mdb") & ";UID=admin;PWD=;"
set conn = server.CreateObject ("adodb.connection")
Conn.Open Connection
Connection.execute "update Visitors set DateTimeExit = '" & Now() _
& "' where RecordID = " & Session("RecordID")
End Sub
</script>
