Managed Dbf

Click here to edit subtitle

- STDB Assembly


  Table.Navigator.GoTo



- Command descriptions


  Set or positions the record pointer to desired specific physical record number in the table. Table.Navigator.GoTo ignores

  Table.Remover.ShowDeleted settings. If record number is valid, it will positioned the record pointer of the table, whether the record

  is marked for deletion or not. Unlike, Table.Navigator.GoTop/GoBottom those commands respects theTable.Remover.ShowDeleted 

  settings.



- Parameters and overloads

     

  GoTo( int recno )


       int recno :  Physical existing record number in table.


- Returns value


  void / none



- Example
 
  // This example opens a customer database file, go to record 100 and display customer's name on a message box,
  // 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.GoTo( 100 );
  MessageBox.Show(  CUSTOMER.Reader.C("CUST_NAME")  );

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


- Equivalent Visual FoxPro / Clipper / XBase codes

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

  GOTO 100
  Messagebox( CUSTOMER.cust_name ) 

  USE
  CLOSE DATABASE


- Unhandle exception error
Invoking GoTo command without opening a database file first.


Passing record number that is beyond the actual records count on the database file.