Managed Dbf

Click here to edit subtitle

;

- STDB Assembly


  Table.Navigator.Skip



- Command descriptions


  Positions or moves table's record pointer forward or backward.


- Parameters and overloads

     

  Skip( int skipRecords )


     int skipRecords : Number of records to move the record pointer, specifiying negative value moves the record pointer backward or upward.


- Returns value


   bool



- Example 
 
  // This example opens a customer database file, go to the top record and display customer's name on a message box

  // prompt the to display next record, if yes moves record pointer downward until end of file encountered, otherwise exit,

  // close the table file and finally destroy customer object table.

  STDB.Table CUSTOMER = new STDB.Table();
  CUSTOMER.File.Use( @"\\MyServer\Data\FileMan\CUSTOMER.DBF", TableShare.Shared, TableAccess.ReadOnly, true );

  CUSTOMER.Navigator.GoTop();
 
  while( ! CUSTOMER.Navigator.IsEOF() )
  { 
       var mRes = MessageBox.Show( "Customer :" + CUSTOMER.Reader.C("CUST_NAME") + " | Display next record?",
                                                       "SYSTEM ADVICE", MessageBoxButton.YesNo, MessageBoxImage.Question );

       if ( mRes == MessageBoxResult.No  )
       {
            break;
       }

       CUSTOMER.Navigator.Skip( 1 );
  }

  CUSTOMER.File.Use();
  CUSTOMER.Dispose(); CUSTOMER = null;


- Equivalent Visual FoxPro / Clipper / XBase codes

  USE \\MyServer\Data\FileMan\CUSTOMER.DBF  SHARED  NOUPDATE

  GO TOP
 
  DO WHILE ! EOF()

        IF Messagebox( "Customer : "+CUSTOMER.cust_name+" | Dispplay next record?", 4+32 , "SYSTEM ADVICE" ) == 7
            EXIT
        ENDIF

        SKIP

 ENDDO

  USE
  CLOSE DATABASE



- Unhandle exception error