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?
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?
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 sql delphi delphi-7
You are not signed in. Login or sign up in order to post.
Just so we’re clear, you want to go back 5 out of 5 records?
– Guilherme Lima
Not necessarily, I can go back N times.
– Tiago Casanova