Jak skoczyć od razu np do 10ego rekordu w TTable

0

Witam!

chodzi mi o coś takiego że np od razu chciałbym skoczyć do 10ego rekordu np podaję numer rekordu i tam skaczę i gdzie można wyciągnąć informacje na którym aktualnie rekordzie jestem ? w którym komponencie to jest zapisane ?

0
DataSource.DataSet.RecNo := 10;
0

Weź przeczytaj jakiś pierwszy lepszy kurs o programowaniu bazodanowym :/

0
delphi help napisał(a)

Moves to another record relative to the active record in the dataset.

Delphi syntax:

function MoveBy(Distance: Integer): Integer;

C++ syntax:

int __fastcall MoveBy(int Distance);

Description

Call MoveBy to move the active record by the number of records specified by Distance. A positive value for Distance indicates forward progress through the dataset, while a negative value indicates backward progress. For example, the following statement moves backward through the dataset by 10 records:

MoveBy(-10);
DataSet1->MoveBy(-10);

MoveBy posts any changes to the active record and

Sets the Bof and Eof properties to false.
If Distance is positive, repeatedly fetches Distance subsequent records (if possible), and makes the last record fetched active. If an attempt is made to move past the end of the file, MoveBy sets Eof to true.
If Distance is negative, repeatedly fetches the appropriate number of previous records (if possible), and makes the last record fetched active. If an attempt is made to move past the start of the file, MoveBy sets Bof to true. If the dataset is unidirectional, the dataset raises an EDatabaseError exception when MoveBy tries to fetch a prior record.

Broadcasts information about the record change so that data-aware controls and linked datasets can update.
Returns the number of records moved. In most cases, Result is the absolute value of Distance, but if MoveBy encounters the beginning-of-file or end-of-file before moving Distance records, Result will be less than the absolute value of Distance.

delphi help napisał(a)

Indicates the current record in the dataset.

Delphi syntax:

property RecNo: Longint;

C++ syntax:

__property int RecNo = {read=GetRecNo, write=SetRecNo, nodefault};

Description

Examine RecNo to determine the record number of the current record in the dataset. Applications might use this property with RecordCount to iterate through all the records in a dataset, though typically record iteration is handled with calls to First, Last, MoveBy, Next, and Prior.

Note: If accessing Paradox tables, RecNo can be set to a specific record number to position the cursor on that record.

Juhas napisał(a)

Weź przeczytaj jakiś pierwszy lepszy kurs o programowaniu bazodanowym :/

popatrz na własne pytania ...

1 użytkowników online, w tym zalogowanych: 0, gości: 1