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

PROTOTYPE IN
   sc_base.h

DESCRIPTION
   scdikadd 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 scdikadd).

NOTES
   When adding character keys it is necessary to pad the key string to size
   with spaces (" "), the function will not automatically do this for you.
   This differs from the dBASE and Clipper corresponding functions.

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

   void main()
   {
     int dbf, idx;
     long recno;
     unsigned char key[8]
     double length = 123.67L

     scdinit(20,0);
     if (scddopenx(&dbf, "TOC.DBF",0) == SC_SUCCESS) {
       if (scdiopenx(&idx, "TOCLNGTH.IDX", SC_BUFFER) == SC_SUCCESS) {
         scddfput(dbf,1,&length);
         if (scddrput(dbf,&recno,SC_ADD) == SC_SUCCESS) {
           scdiknum(key,length);
           scdikadd(idx,key,recno);
         }
         scdiclose(idx);
       }
       scddclose(dbf)
     }
     scdterm();
   }

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