BLOB READ()

From Recital Documentation Wiki
Jump to: navigation, search

PURPOSE

Read a blob


SYNONYM

api_blob_read()


SYNOPSIS

#include "dbapi.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 "dbapi.h"
 
dbapi_blob_read()
{
	int	blobsize;
	char	blobuf[8000];
 
	if (_parinfo(1) == API_CTYPE) {
		blobsize = BLOB_SIZE(_parc(1));
		BLOB_READ(_parc(1), blobuf, blobsize);
	}
}


SEE ALSO

BLOB_RECLAIM(), BLOB_SIZE(), BLOB_UPDATE(), BLOB_WRITE()