Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SIx Driver RDD v3.00 - Reference Guide - <b>sx_memopack():</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Sx_MemoPack():

  Syntax:  Sx_MemoPack( [<nBlock>] [,<bOption> [,<nStep>]] )

            nBlock = a number from 16 to 1024 (in multiples of 16).  The
                     <nBlock> parameter is only applicable when using .FPT or
                     .SMT memo files.  The block size currently being used
                     within the FPT/SMT file will be used if no block size
                     parameter is specified.
           bOption = a code block to evaluate for each record processed or,
                     when used in conjunction with the <nStep> parameter, for
                     each <nStep> records.
            nStep  = numeric value representing how often, in number of
                     records processed, to call the <bOption> code block.

  Returns:  .T. if memo was packed successfully, .F. if not.

  Description:  Purges unused blocks from a memo file without having to do
                the old COPY TO ... FOR !Deleted() kludge.  Can also be used
                to alter the block size used by an FPT memo file.

    CAUTION:  Do NOT attempt to use this function if you specify paths
              using the Netware-specific syntax. You will lose data!  For
              example, never do this:

               USE FS\SYS:data\datafile
               MEMOPACK

                This is fine:

               USE y:\data\datafile
               MEMOPACK

   Example:

       // Packs BOGUS.FPT, using 32 byte blocks, outputting a dot (.) to the
       // screen for every 10% of the records processed to show progress.

       USE bogus EXCLUSIVE VIA "SIXCDX"
       ? "Packing BOGUS.FPT: "
       IF Sx_MemoPack( 32, {|| QQOut(".")}, LastRec() / 10 )
         ? "Memo file packed successfully."
       ELSE
         ? "Memo file NOT packed successfully."
       ENDIF


   NOTE:  The DBF file must be opened in EXCLUSIVE mode to use this
          function.


See Also: MEMOPACK Sx_SetMemoBlock()

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