|
|
|
|
|
| | |
|
Active Server Pages ASP programs help tutorial tutorials routine routines jobs listserve mailinglist bulletin board bulletin boards programming snippet snippets CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
accessing the last record in a recordset |
From: |
Mark Minneman |
Date: |
12/29/1999 9:41:21 AM |
IP: |
216.28.40.147 |
I have a database that I am connecting to via ODBC and am able to scroll through the table that I am interested in and display all of the records using my ASP script. What I really want to do, though, is display only the last record.
I have tried multiple methods to access the last record, all of which have failed.
1. I tried looping to the last record. This ran me over the end of the recordset and there was no data to display.
2. I tried to use <recordset>.MovePrevious to get back to the last record from EOF. That function call was not supported.
3. I tried to use <recordset>.MoveLast to get to the last record. That function call was not supported.
Is there any way to loop to the last record without hitting EOF?
Or is there any way to modify the WHERE clause in the SELECT statement to return only the last record (there is a column "recordID" that has a unique integer value which is incremented with each new record added).
Thanks in advance for any help you may be able to provide.
Mark |
Follow Up - Re: accessing the last record in a recordset - Tim 1/5/2000 8:03:53 AM
Follow Up - Re: accessing the last record in a recordset - Ricardo Londe 1/5/2000 10:53:19 AM
|
|

|
|
|
|
|
|
|
|
|
|