Hit Counter Help!
Hi, Im a beginner with ASP and Im trying to use a very simple hit counter on my page, I can display the current value in the database no problem, but the code I have does not update the number each time the page loads. Im not quite sure whats going on can someone help, thanks!
Neil
<%
Dim objConn, objRS
Set objConn = Server.CreateObject("ADODB.Connection")
Set ObjRS = Server.CreateObject("ADODB.Recordset")
objConn.Provider = "Microsoft.Jet.OLEDB.4.0"
strDBFile = Server.MapPath(".") & "\database.mdb"
objConn.Open strDBFile
Set objRS.ActiveConnection = objConn
objRS.Open "SELECT wapcount from hitcounter"
SQL = UPDATE hitcounter SET wapcounter = wapcounter + 1
objConn.Execute(SQL)
%>
|