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

PROTOTYPE IN
   sc_base.h

DESCRIPTION
   scddunlock will unlock the data file/record for shared use by other
   stations. This function should be used immediately after writing to
   all required data, index and memo 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 <stdio.h>
   #include <softc.h>
   #include <sc_base.h>

   void main()
   {
     int dbf, ndx;
     char *key;
     long record;
     double length = 2367, attribute = 1;

     scdinit(20,0);
     if (scddopenx(&dbf,"TOC.DBF",SC_SHARED) == SC_SUCCESS) {
       if (scdnopenx(&ndx,"TOCNAME.NDX",SC_SHARED) == SC_SUCCESS) {
         scddfput(dbf,0,"ABC.XYZ");
         scddfput(dbf,1,&length);
         scddfput(dbf,2,"07/21/90");
         scddfput(dbf,3,"20:01:45");
         scddfput(dbf,4,&attribute);
         scdnkmake(dbf,ndx,&key);
         scddlock(dbf);
         scddrput(dbf,&record,SC_ADD);
         scdnkadd(ndx,key,record);
         scddunlock(dbf);
         free(key);
         scdnclose(ndx);
       }
       scddclose(dbf);
     }
     scdterm();
   }

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