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_memoarraystyle() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_MemoArrayStyle()
 Allows the programmer to choose which style of memo arrays should be written
 to FPT memo files
------------------------------------------------------------------------------

Syntax

 AX_MemoArrayStyle( [<cMemoStyle>] ) -> charstring

     <cMemoStyle>  An optional character string specifying the memo array
     style that should be used when writing array data in FPT memo
     files. Valid values are "Six" and "FlexFile". The default value is
     "Six".

 Returns

     If no parameter is passed, then it returns the current memo array
     style used to write array data in FPT memo files. If a parameter
     is passed, then it returns the previous array style used to write
     array data in FPT memo files.

 Description

     The Advantage DBFCDXAX RDD can read and write both character and
     array data in FPT memo files.  A single "syntax" or "style" exists
     for character data. However, two different proprietary "syntax" or
     "styles" for array storage in FPT memo files exist. One
     style was defined by SuccessWare's Six Driver RDD. The other style
     was defined by Ganahl Software's FlexFile RDD.

     Advantage can READ array data from an FPT memo containing either
     or both styles of memo array data. The AX_MemoArrayStyle() function
     does not need to be set to either specific style in order to read
     array data in FPT memo files. Advantage will read either style of
     memo array data correctly no matter which style has been set by the
     AX_MemoArrayStyle() function.

     Advantage can WRITE array data to an FPT memo using either style
     of memo array data. The AX_MemoArrayStyle() function, however, must
     be used to specify which style of memo array storage should be
     used when writing array data to an FPT memo. If "Six" is passed to
     the AX_MemoArrayStyle() function, all future writes of array data
     in all work areas will be stored in the FPT memo file using the Six
     Driver syntax. If "FlexFile" is passed to the AX_MemoArrayStyle()
     function, all future writes of array data in all work areas will
     be stored in the FPT memo file using the FlexFile syntax. Six
     Driver syntax is the default syntax used when writing array data
     in FPT memo files.

     Note: The CA-Clipper 5.3 DBFCDX RDD reads and writes the FlexFile
     style array data ONLY in FPT memo files.

     AX_MemoArrayStyle() is only applicable to the Advantage DBFCDXAX RDD
     because the DBFCDXAX RDD uses FPT memo files. The Advantage
     DBFNTXAX RDD uses DBT memo files, which do not support the writing
     of array data.

 Example

     local aArrayData

     USE test VIA "DBFCDXAX"            // Opens TEST.DBF and TEST.FPT

     // This will read the array data stored in the FPT memo file no
     // matter which "style" was used when it was written.
     aArrayData := test->memofield

     APPEND BLANK

     // Set the style to be used to write memo array data
     AX_MemoArrayStyle( "FlexFile" )

     // This array data will be written to the FPT memo file using
     //   the FlexFile syntax
     test->memofield := {{ 1, "hi there", .T. }, { .F., 3.14159 }}

     APPEND BLANK

     // Set the style to be used to write memo array data
     AX_MemoArrayStyle( "Six" )

     // This array data will be written to the FPT memo file using
     //   the Six Driver syntax
     test->memofield := {{ 1, "hi there", .T. }, { .F., 3.14159 }}


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