[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
OPEN_DBF()      Opens a DBF file and all its NTX files

Description:
  OPEN_DBF() uses a database dictionary to open a specified database and
  all its associated index files.



Syntax:     
  OPEN_DBF( <expC> )


Pass:       
  <expC>   = Name of database to open.  i.e. "MYFILE"


Return:     
  <expL>   = .T. if successful, otherwise .F.


Notes:      
  You must have properly setup the database and index dictionary.
  Sample database and index dictionaries have been provided with this
  library (DBF_DICT.DBF and NTX_DICT.DBF).  Please study these examples
  to see how to properly setup a database/index dictionary.

  *** WARNING!!  EXTREMELY IMPORTANT ***   OPEN_DBF() requires that you
  do not open any database file in work area 10 (J). If you do, you will
  experience unpredictable results!



Example:    
  OPEN_DBF( "CLIENTS" )
  .
  .
  .


Usage:      
  OPEN_DBF() is primarily used to allow several different database
  applications to access common databases and maintain common index
  files without having to re-compile and link each application.

  In other words, the database structures and index keys are maintained
  outside of **ALL** applications and thus can be used by all
  applications.

  Example: Let's assume that you are writing a program that maintains an
  inventory database and you main file is called INVENT.DBF.  You have
  an index called INV_NMBR.NTX with a key of "PROD_CODE+WHSE".

  Let's further assume that a co-worker of yours is writing a program
  that produces a listing of inventory based on its sales volume.
  He/She needs an index file called INV_VOL.NTX with a key of
  "TOT_SALES+PROC_CODE".

  All that needs to take place so that both index files are maintained
  is... the index file and its key are added to the index dictionary.
  In this fashion your inventory maintenance program will open and
  maintain the index file needed by your co-worker and vice-versa.

See Also:
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson