Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Advantage CA-Clipper Guide v5.5 - set memoblock http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SET MEMOBLOCK
 Set the block size for FPT memo fields
------------------------------------------------------------------------------

 Syntax

     SET MEMOBLOCK TO <nValue>

     <nValue> specifies a numeric block size (in bytes) to use when
     assigning memory for new FPT memo fields.  If <nValue> is between 1
     and 32, inclusive, storage for memo fields is allocated in blocks of
     <nValue> * 512 bytes.  If <nValue> is greater than 32, storage is
     allocated in blocks of <nValue> bytes.  The default value is 64.
     The Advantage block size algorithm is identical to that defined by
     FoxPro for FPT memo files.

 Description

     This command sets the default memo block size for FPT memo files.
     This setting is ONLY affects the CREATION of new tables that
     contain memo fields when using the Advantage DBFCDXAX RDD.

     Note: This function does not affect CA-Clipper/dBASE-compatible
     DBT memo files.

     Note:  If you are using a block size of 32 or less, and you
     created an FPT file with SuccessWare's SIXCDX RDD, CA-Clipper's
     DBFCDX RDD, or Loadstone's COMIX RDD, Advantage (and FoxPro) will
     not be compatible with the FPT.  These non-Advantage RDDs do not
     obey the FoxPro defined standard with memo blocks of size 32 or
     less.  A block size of 32 is the default for these non-Advantage
     RDDs, so it is likely you will run into this incompatibility if are
     using non-Advantage CDX RDDs.  You Advantage application may get
     7010 errors indicating this problem exists.  To alleviate the
     problem, create a new DBF and FPT with Advantage and copy all
     data from the old DBF and FPT to the new DBF and FPT using your
     non-Advantage CDX RDD.  Then delete the old DBF and FPT.

 Example

     // This example demonstrates the creation of a new table with
     // an FPT memo file.

     // Display something on the screen
     ? "Creating MEMOTEST.DBF..."

     // Make Advantage the default RDD
     AX_SetRDD( "DBFCDXAX" )

     // Set the memo block size to 128 bytes
     SET MEMOBLOCK TO 128

     // Create a new table with an FPT memo field using modified block size
     dbCreate( "MEMOTEST",{{ "LAST_NAME",  "C", 20, 0 },;
                           { "FIRST_NAME", "C", 20, 0 },;
                           { "STREET",     "C", 30, 0 },;
                           { "CITY",       "C", 15, 0 },;
                           { "STATE",      "C",  2, 0 },;
                           { "BALANCE",    "N",  8, 2 },;
                           { "NOTES",      "M", 10, 0 }} )


See Also: AX_SetMemoBlock()

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