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

PROTOTYPE IN
   sc_base.h

DESCRIPTION
   scddfget gets data from the desired field fieldno of the record I/O
   buffer. data will be converted from dBASE to a more natural data type
   for 'c':

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

   Date and character fields are returned as ASCIIZ strings. The date strings
   will be formatted under control of the global variable: sc_date_style.
   This variable will default to SC_GREGOR.

   Data returned by this function for memo fields is the memo file record
   number NOT the actual memo text. A call must be made to scdtrget to
   retrieve the memo text.

   scddfinfo can be used to determine the length of the longest data field
   in the file.

NOTES
   Fields are numbered from zero (0).

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

   void main()
   {
     int dbf;
     char name[65], time[9], date[9];
     double length, attribute;

     scdinit(20,0);
     if (scddopenx(&dbf,"TOC.DBF",0) == SC_SUCCESS) {
       scddrget(dbf,1L);
       scddfget(dbf,0,name);
       scddfget(dbf,1,&length);
       scddfget(dbf,2,date);
       scddfget(dbf,3,time);
       scddfget(dbf,4,&attribute);
       printf("%s %lf %s %s %lf\n",name,length,date,time,attribute);
       scddclose(dbf);
     }
     scdterm();
   }

See Also: scdtrget scddfgets scddfput scddfinfo scddrget

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