|
|
Postada em 26/07/2004 08:49 hs
'contador de acessos Dim MesAtual, AnoAtual, rst, SQL, rst1, SQL1 MesAtual = month(now) AnoAtual = year(now) SQL = "SELECT Contador.Ano, Contador.Mes, Contador.Acessos FROM Contador WHERE (((Contador.Ano)=" & AnoAtual & ") AND ((Contador.Mes)=" & MesAtual & "));" Set rst = server.createobject("adodb.recordset") rst.open SQL, vgdb, 2, 2 if not rst.eof then rst("Acessos") = rst("Acessos") + 1 rst.update rst.close set rst = nothing else rst.close set rst = nothing SQL1 = "SELECT * FROM Contador" Set rst1 = server.createobject("adodb.recordset") rst1.open SQL, vgdb, 2, 2 rst1.addnew rst1("Ano") = AnoAtual rst1("Mes") = MesAtual rst1("Acessos") = 1 rst1.update rst1.close set rst1 = nothing end if %>
|
|
|
|