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
NumBytesparameter 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
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access