Difference between revisions of "BLOB SIZE()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
m (Text replace - "lianjaapi.h" to "lianja_api.h")
 
Line 7: Line 7:
 
==SYNOPSIS==
 
==SYNOPSIS==
 
<code lang="c">
 
<code lang="c">
#include "lianjaapi.h"
+
#include "lianja_api.h"
  
 
int BLOB_SIZE(fldname)
 
int BLOB_SIZE(fldname)
Line 27: Line 27:
  
 
<code lang="c">
 
<code lang="c">
#include "lianjaapi.h"
+
#include "lianja_api.h"
  
 
lianjaapi_blob_size()
 
lianjaapi_blob_size()

Latest revision as of 06:44, 11 April 2013

PURPOSE

Return the size of a blob

SYNONYM

api_blob_size()

SYNOPSIS

#include "lianja_api.h"
 
int	BLOB_SIZE(fldname)
 
<input parameters>
char	*fldname;	/* Address of a buffer containing a blob field name	*/
 
<output parameters>
none

DESCRIPTION

The BLOB_SIZE() function will return the number of bytes the blob occupies in the memo file for the specified field in the current record.

It will return -1 if the blob field is empty on the current record.

EXAMPLE

The following example will return the size of a blob field specified as the first parameter for the current record of the database.

#include "lianja_api.h"
 
lianjaapi_blob_size()
{
    int	rc;
 
    if (_parinfo(1) == API_CTYPE) {
       rc = BLOB_SIZE( _parc(1) );
    } else {
       rc = -1;
    }
 
    _retni( rc );
}

SEE ALSO

BLOB_READ(), BLOB_RECLAIM(), BLOB_UPDATE(), BLOB_WRITE()