BLOB READ()
From Lianjapedia
Revision as of 06:44, 11 April 2013 by Yvonne.milne (Talk | contribs)
PURPOSE
Read a blob
SYNONYM
api_blob_read()
SYNOPSIS
#include "lianja_api.h" int BLOB_READ(fldname, blob, maxsize) <input parameters> char *fldname; /* Address of a buffer containing a blob field name */ int maxsize; /* Maximum size of the blob */ <output parameters> unsigned char *blob; /* Address of a buffer containing the blob data */
DESCRIPTION
The BLOB_READ() function will read a blob from the memo file for the fieldname specified in the current record.
EXAMPLE
The following example reads a blob into the buffer from the specified blob field.
#include "lianja_api.h" lianjaapi_blob_read() { int blobsize; char blobuf[8000]; if (_parinfo(1) == API_CTYPE) { blobsize = BLOB_SIZE(_parc(1)); BLOB_READ(_parc(1), blobuf, blobsize); } }