<% Dim file, connection, rs tid=Now() file=Request.QueryString("file") If file="" Then%> <% Else Set connection=Server.Createobject("Adodb.Connection") connection.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & database Set rs = connection.Execute("SELECT * FROM download WHERE fldURL = '" & file & "'") If rs.EOF Then connection.Execute("INSERT INTO download (fldURL, fldLast, fldTimes, fldStart) VALUES ('" & file & "', #" & tid & "#, 0, #" & tid & "#)") End if Set rs = connection.Execute("SELECT * FROM download WHERE fldURL = '" & file & "'") times=cInt(rs("fldTIMES"))+1 Set rs = connection.Execute("UPDATE download SET fldTIMES = " & times & " Where fldURL = '" & file & "'") Set rs = connection.Execute("UPDATE download SET fldLAST = #" & Now() & "# Where fldURL = '" & file & "'") Response.ReDirect file End If%>