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 scdckadd(
           int handle,
           void *key,
           long recno );

PROTOTYPE IN
   sc_base.h

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

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

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

   void main()
   {
     int dbf, ntx;
     char name[65] = "ABC.DEF";
     long recno;

     scdinit(20,0);
     if (scddopenx(&dbf,"TOC.DBF",0) == SC_SUCCESS) {
       if (scdcopenx(&ntx, "TOCNAME.NTX", SC_BUFFER) == SC_SUCCESS) {
         scddfputs(dbf,0,name);
         if (scddrput(dbf,&recno,SC_ADD) == SC_SUCCESS)
           scdckadd(ntx,name,recno);
         scdcclose(ntx);
       }
       scddclose(dbf)
     }
     scdterm();
   }

See Also: scdckmake

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