[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
USAGE
   signed int scddlock(
           signed int handle );

PROTOTYPE IN
   sc_base.h

DESCRIPTION
   scddlock will lock the entire data file for exclusive use by this
   station. This function should be used immediately prior to adding records
   to the data file, or writing to the index and/or memo files. A call to
   scddunlock should immediately follow the write so that others may
   again access the data, memo, and index files.

   File sharing is enabled by opening the data file with SC_SHARED in the
   command switch. Any associated index and memo files should also be opened
   with SC_SHARED in the command switch.

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

   void main()
   {
     int dbf;
     long record;
     double length = 1305, attribute = 1;

     scdinit(20,0);
     if (scddopenx(&dbf,"TOC.DBF",SC_SHARED) == SC_SUCCESS) {
       scddfput(dbf,0,"MNO.XYZ");
       scddfput(dbf,1,&length);
       scddfput(dbf,2,"07/22/90");
       scddfput(dbf,3,"20:10:45");
       scddfput(dbf,4,&attribute);
       scddlock(dbf);
       scddrput(dbf,&record,SC_ADD);
       scddunlock(dbf);
       scddclose(dbf);
     }
     scdterm();
   }

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