Board index » delphi » Goto Record

Goto Record

Given a recordNo (example: 10), how do I move to that record without keeping
a count and iterating through the dataset.

Shane Holmes
Sh...@Holmes.net

 

Re:Goto Record


Quote
Shane Holmes wrote:

> Given a recordNo (example: 10), how do I move to that record without  > keeping a count and iterating through the dataset.

Hope this is what you're looking for:

Table1.First;
Table1.MoveBy(10);
________
Andreas

Re:Goto Record


Quote
On Tue, 1 Feb 2000 16:01:06 -0800, "Shane Holmes" <sh...@holmes.net> wrote:
>Given a recordNo (example: 10), how do I move to that record without keeping
>a count and iterating through the dataset.

Set the RecNo property of the dataset component to the target record
number. For example, to go to the second record in a Paradox table:

  Table1.RecNo := 2;

==========================================================================
Steve Koterski                  "Computers are useless. They can only give
Technical Publications          you answers."
Borland                                       -- Pablo Picasso (1881-1973)
http://www.borland.com/techpubs/delphi

Other Threads