DawgieDog
01-04-2003, 08:05 AM
<%
Set conn = server.CreateObject("Adodb.connection")
Set rs = Server.CreateObject("Adodb.Recordset")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/emc.mdb") & ";"
sqlGetCount = "SELECT * FROM Counter"
rs.Open sqlGetCount, conn
Count = rs("Count")
NewCount = Count + 1
rs.Close
sqlAddCount = "INSERT INTO Counter (Count) VALUES (" & NewCount & ")"
rs.Open sqlAddCount, conn
Set rs = Nothing
conn.Close
Set conn = Nothing
%>
I dunno if I have to post the mdb file since when I open it all I see is rectangles like: [](but together). The problem with the counter is it got stuck at 2 visits, lol. Here is the code I'm putting in my source: <font color="#ffcc00" size="1">Visit Number:</font> <font color="#000000" size="1"><!--#include file="counter.asp" --><%=NewCount%></font>
Set conn = server.CreateObject("Adodb.connection")
Set rs = Server.CreateObject("Adodb.Recordset")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/emc.mdb") & ";"
sqlGetCount = "SELECT * FROM Counter"
rs.Open sqlGetCount, conn
Count = rs("Count")
NewCount = Count + 1
rs.Close
sqlAddCount = "INSERT INTO Counter (Count) VALUES (" & NewCount & ")"
rs.Open sqlAddCount, conn
Set rs = Nothing
conn.Close
Set conn = Nothing
%>
I dunno if I have to post the mdb file since when I open it all I see is rectangles like: [](but together). The problem with the counter is it got stuck at 2 visits, lol. Here is the code I'm putting in my source: <font color="#ffcc00" size="1">Visit Number:</font> <font color="#000000" size="1"><!--#include file="counter.asp" --><%=NewCount%></font>