Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default End Of Recordset!!

    Mostlikely a very simple answer to this question.

    I am wanting to move to the last record in a recordset and extract a value
    from it.
    When i go move last and move previous i get an error saying catch fetch
    backwards.

    I augment my ignorance,..but here goes..how do i do this ??


    Adam Knight Guest

  2. Similar Questions and Discussions

    1. ASP Recordset Help!
      Hi, I have been trying to construct a results page in dreamweaver/asp if i put a search in with one parameter it works fine (ie, select name from...
    2. Using a Recordset
      I'm trying to expand my web design skills by learning how to include some dynamic content in a site. Currently I have an Access database, and...
    3. Is this possible with a recordset?
      Hello, Looking for some expert help. I am using Dreamweaver MX 2004. I have a need that I was wondering if it was possible accomplish using a...
    4. ADO - Recordset
      I was wondering if anyone can help me. I've converting an already existing system (designed in Access which produces reports for the accounts dept)...
    5. RecordSet.Move or RecordSet.AbsolutePosition??
      Hi, I'm trying to use either one of these methods to position the cursor in a specific position inside a recordset, but neither one seems to...
  3. #2

    Default Re: End Of Recordset!!

    a) Use the ORDER BY clause in your SQL statement to reorder the recordset in
    the order that you want

    -or-

    b) If you need all the records, but you need to use the last value first,
    then:

    Set objRS = objConn.Execute(strSQL)

    ' Put results into a VBScript array
    If not objRS.EOF then arrResults = objRS.GetRows

    ' Get rid of ADO object
    objRS.Close
    Set objRS = Nothing
    objConn.Close
    Set objConn = Nothing

    ' Get last value
    If isArray(arrResults) then
    strLastValue = arrResults(0, UBound(arrResults(2) -1)
    End If

    Cheers
    Ken
    "Adam Knight" <aj.knight@optusnet.com.au> wrote in message
    news:uEMiS%23qeDHA.1088@TK2MSFTNGP10.phx.gbl...
    : Mostlikely a very simple answer to this question.
    :
    : I am wanting to move to the last record in a recordset and extract a value
    : from it.
    : When i go move last and move previous i get an error saying catch fetch
    : backwards.
    :
    : I augment my ignorance,..but here goes..how do i do this ??
    :
    :


    Ken Schaefer Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139