Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SoftC Database Library v2.1 Guide - usage http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
USAGE
   int scddopenx(
           int *handle,
           char *filename,
           int command );

PROTOTYPE IN
   sc_base.h

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

   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. A buffer of at
   least 512 bytes but no more than 16384 will be allocated during the open.
   Caching of record I/O greatly increases the speed of sequential 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
   All field names and types, and the file name will be converted to upper
   case after the file has been opened.

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

   void main()
   {
     int dbf;

     scdinit(20,0);
      scddopenx(&dbf, "TOC.DBF", SC_SHARED|SC_FLUSH|SC_RDWR);
     scdterm();
   }

See Also: scddopenx

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson