Hi I have this problem.
I added counter to my home page to count visits it was working normally but when i get more traffic i face some error there assume i have the visit counter shows 700 visit when the error appear it changes the visit counter to 0 and start from there please could any body help m with this.
here is the code i am using
to read old value
VB Code:
  1. accessdb = server.mappath("any.mdb")
  2. strconn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
  3. strconn = strconn & accessDB & ";"
  4. Set conn = Server.CreateObject("ADODB.Connection")
  5. conn.open strconn
  6. strsql = "SELECT * FROM table where id=" & id
  7. Set rs = conn.execute(strsql)
  8. hits=rs("hits")
  9. rs.close
  10. set rs = nothing
  11. conn.close
  12. Set conn = nothing
  13. hits=hits+1

update with new value

VB Code:
  1. accessdb = server.mappath("any.mdb")
  2. strconn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
  3. strconn = strconn & accessDB & ";"
  4. Set conn = Server.CreateObject("ADODB.Connection")
  5. conn.open strconn
  6. conn.execute("update table set [hits]=" & hits & " where [id]=" & id)
  7.  conn.close
  8. Set conn = nothing

Thanks