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 scdwrput(
           int handle,
           long *recno,
           char *data,
           int command );

PROTOTYPE IN
   sc_base.h

DESCRIPTION
   scdwrput writes data to the memo file specified by handle. The
   record number written is returned in recno. This record number must
   be then written to the data output buffer via a call to scddfput. This
   function assumes that data is an ASCIIZ string with a maximum length
   of 65,536 characters.

   Unlike dBASE III memo files which appends all writes at end of the file,
   FoxPro allowa updating an existing memo in place. command determines
   how the memo text is written:

   SC_ADD       append to end of the file
   SC_UPDATE    update current record

RETURN VALUES
   SC_SUCCESS   record written successfully
   SC_WRTFAIL   file write failure
   SC_SKFAIL    file pointer reposition failed
   SC_BADHNDL   invalid handle number
   SC_NULLPARM  parameter address NULL

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

   void main()
   {
     int fpt;
     char data[512];
     long recno;

     scdinit(20,0);
     if (scdwopenx(&fpt,"TOC.FPT",SC_BUFFER) == SC_SUCCESS) {
       strcpy(data,"hello world.");
       scdwrput(fpt,&recno,data,SC_ADD);
       printf("%ld",recno);
       scddclose(fpt);
     }
     scdterm();
   }

See Also: scdwrput

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