Главная страница | назад





Article #16156: dBase Record #'s

 Question and Answer Database

FAQ1156C.txt   dBase Record #'s
Category   :BDE
Platform    :All
Product    :C++Builder  1.x

Question:

How do you go to a specific record Number in a DBase Table?

Answer:

     void __fastcall gotoRecord(TTable* T, int RecNo)
     {
        DBIResult rslt;
        TResyncMode rm;

        rslt = DbiSetToRecordNo(T->Handle, RecNo);
        if (rslt != DBIERR_NONE)
        {
           if (rslt == DBIERR_EOF)
              T->Last();
           if (rslt == DBIERR_BOF)
	      T->First();
        }

        T->Resync(rm<

Last Modified: 01-SEP-99