Difference between revisions of "BLOB UPDATE()"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) m (Text replace - "lianjaapi.h" to "lianja_api.h") |
||
Line 7: | Line 7: | ||
==SYNOPSIS== | ==SYNOPSIS== | ||
<code lang="c"> | <code lang="c"> | ||
− | #include " | + | #include "lianja_api.h" |
int BLOB_UPDATE(fldname, blob, size) | int BLOB_UPDATE(fldname, blob, size) | ||
Line 27: | Line 27: | ||
<code lang="c"> | <code lang="c"> | ||
− | #include " | + | #include "lianja_api.h" |
lianjaapi_blob_update() | lianjaapi_blob_update() |
Latest revision as of 06:44, 11 April 2013
PURPOSE
Update a blob
SYNONYM
api_blob_update()
SYNOPSIS
#include "lianja_api.h" int BLOB_UPDATE(fldname, blob, size) <input parameters> char *fldname; /* Address of a buffer containing a blob field name */ unsigned char *blob; /* Address of a buffer containing the blob data */ int size; /* Blob size */ <output parameters> none
DESCRIPTION
The BLOB_SIZE() function updates a blob field from the specified buffer and overwrites the space used by the blob in the current record.
EXAMPLE
The following example updates the blob field specified in the first parameter passed.
#include "lianja_api.h" lianjaapi_blob_update() { int result; if (_parinfo(1) == API_CTYPE && _parinfo(2) == API_CTYPE) { if (!DBF_ISEXCLUSIVE()) DBF_LOCKR(DBF_RECNO()); result = BLOB_UPDATE(_parc(1), (unsigned char) _parc(2), _parcsiz(2) ); if (result) result = DBF_UPDATE(); if (!DBF_ISEXCLUSIVE()) DBF_UNLOCKR(DBF_RECNO()); } else { result = -1; } _retl( (result) ? 1 : 0 ); }