<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Dim rsBook__MMColParam rsBook__MMColParam = "1" If (Request.QueryString("bookID") <> "") Then rsBook__MMColParam = Request.QueryString("bookID") End If %> <% Dim rsBook Dim rsBook_numRows Set rsBook = Server.CreateObject("ADODB.Recordset") rsBook.ActiveConnection = MM_cnBooks_STRING rsBook.Source = "SELECT bookID, uploadAddress, downloadcount FROM dbo.cwcAmazonBooks WHERE bookID = " + Replace(rsBook__MMColParam, "'", "''") + "" rsBook.CursorType = 0 rsBook.CursorLocation = 2 rsBook.LockType = 1 rsBook.Open() rsBook_numRows = 0 %> <% 'if session("supervisor") <> "true" then ' update our tracking count ' Set MM_editCmd = Server.CreateObject("ADODB.Command")' ' MM_editQuery = "update dbo.cwcAmazonBooks set downloadcount = " & cstr(cint(rsBook.Fields.Item("downloadcount").Value) + 1) & " where bookID = " & rsBook.Fields.Item("bookID").Value ' MM_editCmd.ActiveConnection = MM_cnBooks_STRING ' MM_editCmd.CommandText = MM_editQuery ' MM_editCmd.Execute ' MM_editCmd.ActiveConnection.Close 'end if %> <% response.Redirect(rsBook.Fields.Item("uploadAddress").Value) %> Untitled Document <% rsBook.Close() Set rsBook = Nothing %>