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_file2blob() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_File2BLOB()
 Stores the contents of a file into a memo field
------------------------------------------------------------------------------

 Syntax

     AX_File2BLOB( <cFileName>, <cFldName> ) -> logical

     <cFileName>  The name of the file whose contents is to be
     stored in the memo file.

     <cFldName>  The name of the memo field in which to store the
     contents of the file.

 Returns

     Returns TRUE (.T.) if file contents are copied into a memo
     field, returns FALSE (.F.) if not. If .F. is returned, the
     error code returned from the AX_Error() function will give you
     more information as to why the operation failed.

 Description

     AX_File2BLOB() will store a file of any type (ASCII or binary)
     into a memo field. The maximum size of the file to be stored is
     16 MB. The BLOB data can be retrieved from the memo field via
     the AX_BLOB2File() function.

     The term "BLOB" is an acronym for Binary Large Object, which
     means basically any type of binary data, not just plain ASCII
     text that would normally be associated with memo fields.

     Note: AX_File2BLOB() is illegal if performed within a transaction.
     If AX_File2BLOB() is called while within a transaction, a runtime error
     will occur.

     Note:  Advantage memos containing BLOBs are not compatible with
     SuccessWare SIx driver memos that contain BLOBs.

     Note:  The CA-Clipper 5.3 dbFileGet() and dbFilePut() functions
     are not directly supported.  The equivalent Advantage functions,
     AX_File2BLOB() and AX_BLOB2File(), are supported.  CA-Clipper 5.3
     BLOBs are not compatible with Advantage BLOBs, however.  Advantage
     implemented BLOB support before CA-Clipper 5.3 added BLOB support
     via the dbFileGet() and dbFilePut() functions.  CA-Clipper chose to
     not obey the existing Advantage BLOB storage format, and instead
     implemented their own format.

 Example

     USE test VIA "DBFNTXAX"  // Open TEST.DBF and TEST.DBT

     // Read the IMAGE.PCX file into the NOTES field
     AX_File2BLOB( "IMAGE.PCX", "NOTES" )


See Also: AX_BLOB2File()

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