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 scddrputx(
           int handle,
           long *recno,
           int howto );

PROTOTYPE IN
   sc_base.h

DESCRIPTION
   scddrputx will write the data record specified by recno to the data
   file associated with handle from the internal record buffer. howto
   determines how the data record is to be written:

   howto =        action
     SC_ADD         append to end of file
     SC_UPDATE      update current record

   If a record update is occurring the data record number passed in recno
   will be written in the disk file.

   Use scddrgetx to load a data record or scddfput or scddfputs to
   fill the data record field by field.

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

  void main()
  {
    int dbf;
    struct {
      char status;
      char name[65];
      char length[10];
      char date[9];
      char time[9];
      char attribute[2];
    } buffer;

    scdinit(20,0);
    if (scddopenx(&dbf,"TOC.DBF",0) == SC_SUCCESS) {
      scddrgetx(dbf,buffer,1L);
      strncpy(buffer.name,"ABC.XYZ",65);
      scddrputx(dbf,buffer,&recno,SC_ADD);
      scddclose(dbf);
    }
    scdterm();
  }

See Also: scddfput scddfputs scddrget

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