Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO and Getrows method

Status
Not open for further replies.

jimiH

Programmer
May 14, 2001
4
0
0
GB
Is there a way to use the Getrows method to retrieve the last record in a recordset without generating an EOF error, or is there a good way to handle this situation ? Thanks for any assistance that anyone can provide.
 
The syntax for this property is:

Variant = Recordset.GetRows([Rows],[Start],[Fields])

By default, rows are retrieved from the current record, but it is possible to move the start point by setting the Start parameter to any valid bookmark in the recordset, or to one of the BookmarkEnum constants:

adBookmarkCurrent (start at the current record)
adBookmarkFirst (start at the first record)
adBookmarkLast (start at the last record)

example:
varRows = objRec.GetRows(1,adBookmarkLast)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top