The following code is running but the update statement is not working. It is not updating the table value inside the msaccess database.
Is there files that which we have to include to run the database in ASP on the server?
<%
dim strConn
dim strSQL
dim numTemp
Set strConn = Server.CreateObject("ADODB.Connection")
strConn.open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" &Server.MapPath("HitCounter.mdb") &";Persist Security Info=False"
strSQL = "SELECT * FROM Hits WHERE PageID=3"
Set Rs = Server.CreateObject("ADODB.RecordSet")
Rs.Open strSQL, strConn, 3, 3
if Rs.EOF = false then
numTemp = Rs.Fields("Count")
numTemp = numTemp + 5
Rs.Fields("Count") = CLng(numTemp)
Rs.Update()
end if
Rs.Close
Set Rs = Nothing
strConn.Close
Set strConn = Nothing
%>
Is there any code for ASP Hit counter script using javascript or vbscript?