ADO AppendChunk method

Definition and usage

AppendChunk is used to append data to large text or binary data Field or to the Parameter object.

Tip:Use the AppendChunk method of the Field or Parameter object to fill with long binary or character data. In cases where system memory is limited, you can use the AppendChunk method to operate on part of the Long value rather than all of it.

Object Description of the AppendChunk method
Parameter

If the adFldLong bit is set to True in the Attributes property of the Parameter object, you can use the AppendChunk method for this parameter.

The first AppendChunk call on the Parameter object writes data to the parameter, overwriting any existing data. Subsequent AppendChunk calls on the Parameter object add data to the existing parameter data. An AppendChunk call with a Null value discards all parameter data.

Field

If the adFldLong bit is set to True in the Attributes property of the Field object, you can use the AppendChunk method for this field.

The first AppendChunk call on the Field object writes data to the field, overwriting any existing data. Subsequent AppendChunk calls add data to the existing data. If you want to append data to a field and then set or read the values of other fields in the current record, ADO considers that data has been appended to the first field. If the AppendChunk method is called again on the first field, ADO interprets this call as a new AppendChunk operation and overwrites the existing data. Accessing fields in other Recordset objects (not copies of the first Recordset object) will not interrupt the AppendChunk operation.

An error will occur when calling AppendChunk on the Field object if there is no current record.

Note: The AppendChunk method does not work on the Field object of the Record object. It does not perform any operation and will cause a runtime error.

Syntax

objectname.AppendChunk data
Parameter Description
data Variant, containing the data to be appended to the object.