|
<< Click to Display Table of Contents >> C Examples: DbiPutBlob |
![]() ![]()
|
Modify the current record and Blob:
The field specified must be a valid memo blob. pTmpRecBuf must have valid record information. This example uses the following input:
fBlobExample1(hCur, pRecBuf, 7, "Blob text goes here!!");
DBIResult fBlobExample2 (hDBICur hTmpCur, pBYTE pTmpRecBuf, UINT16 uFldNum,
char *Text)
{
DBIResult rslt;
rslt = Chk(DbiOpenBlob(hTmpCur, pTmpRecBuf, uFldNum, dbiREADWRITE));
if (rslt != DBIERR_NONE)
return rslt;
if (Chk(DbiPutBlob(hTmpCur, pTmpRecBuf, uFldNum, 0, strlen(Text) + 1,
(pBYTE)Text)) == DBIERR_NONE)
rslt = Chk(DbiModifyRecord(hTmpCur, pTmpRecBuf, TRUE));
Chk(DbiFreeBlob(hTmpCur, pTmpRecBuf, uFldNum));
return rslt;
}