Name
Field.GetChunk Method — (Versions 2.0, 2.1, 2.5, 2.6)
Synopsis
Setvalue = field
.GetChunk(NumBytes
)
The GetChunk method returns the specified number of bytes or characters from the specified field.
Arguments
-
NumBytes
The
NumBytes
parameter is a Long value representing the number of bytes or characters that you want to receive.
Returns
Variant
Description
The GetChunk method gets pieces of information from a Field object
that belongs to a Fields collection of an open Recordset object. If
the Arguments property of the Field object is set to
adFldLong
, you can use the GetChunk method on that
field.
The first call to GetChunk retrieves the number of bytes specified in the method call, from the beginning of the field. All subsequent calls to GetChunk will return data starting from where the last call to GetChunk left off. If the amount of bytes or characters in the Field object is fewer than the amount that you requested, only the remainder is returned without padding for the difference.
When you read or write to another field within the same Recordset object (one that is not a clone of that recordset), ADO assumes that you are done retrieving chunks from that particular Field object. The next call to GetChunk will perform as if it were the first, retrieving the first number of bytes or characters that you request.
See Also
Field.Arguments Property
Get ADO: ActiveX Data Objects now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.