<% ' Declare our variables... always good practice! Dim strURL ' The URL of this page so the form will work ' no matter what this file is named. Dim Conexao ' ADO connection Dim rstSearch ' ADO recordset Dim strDBPath ' path to our Access database (*.mdb) file Dim strSQL ' The SQL Query we build on the fly Dim strSQL6 ' The SQL Query we build on the fly Dim strSearch ' The text being looked for strURL = Request.ServerVariables("URL") strSearch = Request.QueryString("search") '***********Arquivo Arquivo = "https://www.plantamed.com.br/contador.mdb" strDBPath = Server.MapPath(Arquivo) Set cnnSearch = Server.CreateObject("ADODB.Connection") Set bd = Server.CreateObject("ADODB.Recordset") cnnSearch.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " & strDBPath %> <% If IsEmpty( Request.Form("submit") ) Then ComandoSQL = "SELECT * FROM contador" bd.CursorLocation = 2 bd.CursorType = 0 bd.LockType = 3 bd.Open ComandoSQL, cnnSearch,,, &H0001 If Not bd.EOF Then bd.Move Request.QueryString("n") %> <% contador_d = bd("contador") + 1 strSQL7 = "UPDATE contador SET contador = '" & contador_d &" '" Set bd = cnnSearch.Execute(strSQL7) %> document.write('
Páginas Visitadas após 27/01/2004: <%=contador_d%>
'); <% End if End if %>