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 v6.11 - ax_setmemoblock() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_SetMemoBlock()
 Set memory block size for new memo files
------------------------------------------------------------------------------

 Syntax

     AX_SetMemoBlock( [<nBlkSize>] ) -> numeric

     <nBlkSize> A numeric value representing the size of the memo block
     (in bytes).  The valid range is 1 to 1024 bytes, with the default size
     64 bytes.

 Returns

     Returns a numeric current memo block size setting.

 Description

     This function 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.

     If <nBlkSize> is 1-32 inclusive, storage for memo fields is allocated
     in blocks of <nBlkSize> * 512 bytes.  If <nBlkSize> is greater than
     32, storage is allocated in blocks of <nBlkSize> bytes.  The default
     block size is 64. The Advantage block size algorithm is identical to
     that defined by FoxPro for FPT memo files.

     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
     AX_SetMemoBlock( 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: SET MEMOBLOCK

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