Tbquery back N records

Asked

Viewed 78 times

1

No Lphi if I give one TbQuery.prior It returns a record. But if I want to go back N records, for example, I want to go back 5 records. Does anyone know if there are any methods in Delphi that do this?

  • Just so we’re clear, you want to go back 5 out of 5 records?

  • Not necessarily, I can go back N times.

1 answer

0


You can use the method MoveBy(Distance: Integer).

With this method you indicate in the parameter where you want to move the cursor of the current record.

Values positive move the cursor to forefront in the dataset and values negative for behind.

In your example use TbQuery.MoveBy(-5);

  • Thanks worked.

  • Good that it worked. If your problem has been solved don’t forget to flag http://answall.com/help/someone-answers .

Browser other questions tagged

You are not signed in. Login or sign up in order to post.