Setting up top 10

Results 1 to 3 of 3

Thread: Setting up top 10

  1. #1
    Join Date
    Dec 1969
    Posts
    52

    Default Setting up top 10

    I&#039m trying to set up a top 10 type page where people vote for images and those images with the highest number of votes go in the top 10 for an award...I have been hand coding everything so it&#039s been slow learning asp...but I have everything setup except the page that displays the top 10...I can&#039t seem to get it to work correctly..here is part of it here<BR>&#060;%<BR> set gstemp=Server.CreateObject("ADODB.Recordset")<BR> gstemp.maxrecords=10<BR> connectme="DSN=art.dsn;uid=;pwd="<BR> rSQL = "select * from tblComments ORDER BY Votes DESC;"<BR> gstemp.open rSQL,connectme,adOpenStatic<BR> stuff = (DatePart("m",date))<BR> gstemp.Filter = "Month = " & stuff<BR> mQNO = 0<BR>&#037;&#062; <BR><BR>To my knowledge, this is the only piece that could be causing the problem I&#039m having..instead of showing all the top ten for the month, it only shows about 5 or 6 with the highest number of votes...I have no clue why..any hints...I can send the entire page code if need be...Thanks ahead of time..please email if possible... mailto: rdraper@tla.com

  2. #2
    Marcel Vogel Guest

    Default RE: Setting up top 10

    Hi,<BR><BR>If you use Access as a database then I already know what the problem is, with Access you can&#039t use MaxRecords, try using the TOP function in the SQL query, I believe it was something like: rSQL = "select top 10 from tblComments ORDER BY Votes DESC;"<BR><BR>Marcel.<BR>

  3. #3
    Join Date
    Dec 1969
    Posts
    52

    Default RE: Setting up top 10

    Thanks for your time..I found out what it was..it was actually my Filter command...truthfully I have no idea what was wrong with it, but I changed it around where it works...I&#039m new so, I do lots of testing and this test worked the way I wanted.*grin*..thanks again..!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •