Difference between revisions of "BLOB READ()"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
Line 34: Line 34:
 
dbapi_blob_read()
 
dbapi_blob_read()
 
{
 
{
    int blobsize;
+
int blobsize;
    char blobuf[8000];
+
char blobuf[8000];
 
      
 
      
    if (_parinfo(1) == API_CTYPE) {
+
if (_parinfo(1) == API_CTYPE) {
      blobsize = BLOB_SIZE(_parc(1));
+
blobsize = BLOB_SIZE(_parc(1));
      BLOB_READ(_parc(1), blobuf, blobsize);
+
BLOB_READ(_parc(1), blobuf, blobsize);
    }
+
}
 
}
 
}
 
</code>
 
</code>

Latest revision as of 11:28, 30 March 2009

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()