AppendChunk Method

See Also    Example    Applies To

Appends data from a string expression to a Memo or Long Binary CdbField object in a CdbRecordset.

Syntax

VOIDAppendChunk(LPVARIANT pv );

Parameters

Type Argument Description
LPVARIANT pv A pointer to a variant whose value will be appended to the Fields collection.

Remarks

You can use the AppendChunk and GetChunk methods to access subsets of data in a Memo or Long Binary field.

You can also use these methods to conserve string space when you work with Memo and Long Binary fields. Certain operations (copying, for example) involve temporary strings. If string space is limited, you may need to work with chunks of a field instead of the entire field.

If there is no current record when you use AppendChunk, an error occurs.

Notes

Usage

#include <afxole.h>
#include <dbdao.h>

CdbRecordset      rs;
CdbField         fld;
COleVariant      vVal("abcdefghijklmnop", VT_BSTRT);
...                     // Initialize recordset, etc.
fld = rs.Fields[0];         // Get a field.
fld.AppendChunk(&vVal);    // Append the chunk.