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 scddfput(
           int handle,
           int fieldno,
           void *data );

PROTOTYPE IN
   sc_base.h

DESCRIPTION
   scddfput will convert data from 'c' format to dBASE format and
   place it in the proper field fieldno of the record I/O buffer.

   dBASE field type   returned data type
     'C'                char *
     'D'                char [9]
     'F'                double (dBASE IV)
     'L'                char
     'M'                long
     'N'                double

NOTES
   Fields are numbered from zero (0).

   scddfput uses the global variable sc_date_style to control date
   string formatting. The initial value of this variable is SC_GREGOR.

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

   void main()
   {
     int dbf;
     double length = 1200.0L, attribute = 1.0L;
     long recno;

     scdinit(20,0);
     if (scddopenx(&dbf,"TOC.DBF",0) == 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);
       scddrput(dbf,&recno,SC_ADD);
       scddclose(dbf);
     }
     scdterm();
   }

See Also: scddfget scddfputs

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