[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
USAGE
   signed int scdnopenx(
           signed int *handle,
           signed char *filename,
           signed int command );

PROTOTYPE IN
   sc_base.h

DESCRIPTION
   scdnopenx opens a dBASE index file. Memory will be allocated for a
   file packet, I/O buffers, and other miscellaneous structures for use
   internally by the SoftC Database Library file manager. The index file will
   be tested as much as possible to insure that it is a legitimate dBASE
   index file.

   A block of memory large enough to hold at least 3 pages (1536 bytes) will
   be allocated during the open.  Three pages is the minimum number of
   buffers required to add or delete index keys.

   The file will be opened under control of the command parameter. Using
   SC_RDWR opens the file for both read and write  access. SC_RDONLY
   overrides SC_RDWR and causes the file to be opened for read access
   only. Any attempt to write to a read only file will result in an error
   (SC_READOLY).

   Using SC_EXCLUDE opens the file for exclusive use of this station
   (single user). SC_SHARED overrides SC_EXCLUDE and opens the file
   in multi-user mode. This mode is used when a LAN file is to be shared with
   other stations.

   Using SC_BUFFER opens the file with I/O caching enabled. Memory for
   up to 10 pages will be allocated during the open. Caching of page I/O
   greatly increases the speed of file access. Typically this mode is used
   with single user files. SC_FLUSH overrides SC_BUFFER and causes
   the file to be opened with no caching. This mode is generally used with
   file sharing, although it is not required.

NOTES
   The index expression will be translated to upper case after being read
   from the index file.

EXAMPLE
   #include <softc.h>
   #include <sc_base.h>

   void main()
   {
     int ndx;

     scdinit(20,0);
     if (scdnopenx(&ndx, "UNKNOWN.NDX", SC_BUFFER) == SC_SUCCESS) {
       scdnclose(ndx);
     }
     scdterm();
   }
.

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