C Examples: DbiPutBlob

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

C Examples: DbiPutBlob

Return to chapter overview

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;

}