[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
USAGE
   signed int scdnkadd(
           signed int handle,
           void *key,
           signed long recno );

PROTOTYPE IN
   sc_base.h

DESCRIPTION
   scdnkadd will add key to the index file specified by handle.
   recno is the data record number to be associated with key (the
   data record pointed to by recno must exist prior to calling scdnkadd).

NOTES
   When adding character keys it is not necessary to pad the key string to
   size with spaces (" "), the function will automatically do this for you.

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

   void main()
   {
     int dbf, ndx;
     char name[65];
     long recno;

     scdinit(20,0);
     if (scddopenx(&dbf, "TOC.DBF", 0) == SC_SUCCESS) {
       if (scdnopenx(&ndx, "TOCNAME.NDX", SC_BUFFER) == SC_SUCCESS) {
         strcpy(name,"XYZ.BAK");
         scddfput(dbf,0,name);
         if (scddrput(dbf, &recno, SC_ADD) == SC_SUCCESS)
           scdnkadd(ndx,name,recno);
         scdnclose(ndx);
       }
       scddclose(dbf)
     }
     scdterm();
   }

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