In the following code, I retrieve a key from a search page, open the database which contains the file name and path, add 1 to the count of times viewed (rst.fields("viewed") and update the last time viewed.<BR><BR>PROBLEM: one redirection to this page adds 3 (not 1) to the number of times viewed! Since I add 1, does this mean that the page is accessed three times before the redirection. (Note: target of all redirection are PDF files.)<BR><BR>My code follows:<BR><BR>&#060;%@ Language=VBScript %&#062;<BR>&#060;!--#Include FILE="connection_string.asp"--&#062;<BR>&#039; contains conn, the connection string and sylabasefolder, the<BR>&#039; root of the data location <BR>&#060;%<BR>dim rst,strKeyHold,connct,strRedirect<BR> strKeyHold = Request.QueryString("Key")<BR> sql = "Select tblCatalog.* from tblCatalog where key = " & cstr(strkeyhold) <BR> set rst = server.CreateObject("ADODB.Recordset")<BR> rst.Open sql,conn,1,2<BR> strRedirect = sylabasefolder & "/" & trim(lcase(rst.fields("path"))) & "/" & rst.fields("filename")<BR> rst.fields("viewed") = rst.fields("viewed") + 1<BR>&#039;Response.Write(rst.Fields("viewed")) <BR> rst.fields("lastviewed") = now()<BR>&#039;Response.Write(": " &rst.Fields("lastviewed"))<BR> rst.update<BR> rst.close<BR> set rst = nothing<BR> <BR> Response.Redirect server.URLPathEncode(strRedirect)<BR>%&#062;