[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
BLOBDIRECTGET()
Retrieve data stored in a BLOB file without referencing a specific field
------------------------------------------------------------------------------
Syntax
BLOBDIRECTGET(<nPointer>, [<nStart>], [<nCount>])
--> expBLOB
Arguments
<nPointer> is a pointer to the BLOB data. This pointer can be
obtained using BLOBDIRECTPUT(), BLOBDIRECTIMPORT(), or
DBFIELDINFO(DBS_BLOB_POINTER, <nFieldPos>).
<nStart> is the starting position in <nPointer>. If <nStart> is
positive, the starting position is relative to the leftmost character in
<nPointer>. If <nStart> is negative, it is relative to the rightmost
character in <nPointer>. If <nStart> is omitted, it is assumed to be 1.
<nCount> is the number of bytes of data to retrieve beginning at
<nStart>. If <nCount> is larger than the amount of data stored, excess
data is ignored. If omitted, BLOBDIRECTGET() retrieves to the end of
the data.
Note: <nStart> and <nCount> apply to string data only. They are
ignored for any other data types.
Returns
BLOBDIRECTGET() returns the data retrieved from the BLOB file. The data
type of the return value depends on the actual data stored. Use
VALTYPE() to determine the data type.
Description
BLOBDIRECTGET() retrieves data stored in a BLOB file without the need to
reference a particular field in the database file. It is particularly
useful when accessing data that is larger than 64 KB (such as memo
fields created with the BLOBIMPORT() function).
By default, this function operates on the currently selected work area.
It can be made to operate on an unselected work area by specifying it
within an aliased expression.
Examples
. This example illustrates storing setup information in a BLOB
file, then selectively retrieving the stored information:
FUNCTION PutSettings(aColors,;
aPaths, ;
aPassWords)
LOCAL aSettings
RDDSETDEFAULT ( "DBFCDX" )
MEMOSETSUPER ( "DBFCDX" )
USE Setup NEW via "DBFMEMO"
aSettings := {}
AADD(aSettings, BLOBDIRECTPUT(0, aColors))
AADD(aSettings, BLOBDIRECTPUT(0, aPaths))
AADD(aSettings, BLOBDIRECTPUT(0, aPassWords))
BLOBROOTPUT(aSettings)
CLOSE
FUNCTION GETCOLORS()
LOCAL aSettings
LOCAL aColors
USE Setup NEW VIA "DBFMEMO"
aSettings := BLOBROOTGET()
aColors := BLOBDIRECTGET(aSettings[1])
CLOSE
RETURN aColors
Files Library is CLIPPER.LIB.
See Also:
BLOBDIRECTPUT()
BLOBGET()
BLOBIMPORT()
DBFIELDINFO()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson