Microsoft SDK for Java

appendChunk

This method of the Field class appends data to a large text or binary data Field or Parameter object. The appendChunk method has the following signatures:

appendChunk(byte[] bytes)
appendChunk(char[] chars)
appendChunk(String chars)

In situations where system memory is limited, you can use the appendChunk method to manipulate long values in portions rather than in their entirety.

Implementation in Field Objects

If FieldAttributes.LONG is specified for a Field object, you can use the appendChunk method for that field.

The first appendChunk call on a Field object writes data to the field, overwriting any existing data. Subsequent appendChunk calls add to existing data. If you are appending data to one field and then you set or read the value of another field in the current record, ADO assumes that you are done appending data to the first field. If you call the appendChunk method on the first field again, ADO interprets the call as a new appendChunk operation and overwrites the existing data. Accessing fields in other Recordset objects that are not clones of the first Recordset object will not disrupt appendChunk operations.

If there is no current record when you call appendChunk on a Field object, an error occurs.

Implementation in Parameter Objects

If ParameterAttributes.LONG is specified for a Parameter object, you can use the appendChunk method for that parameter.

The first appendChunk call on a Parameter object writes data to the parameter, overwriting any existing data. Subsequent appendChunk calls on a Parameter object add to existing parameter data. An appendChunk call that passes a null value discards all the parameter data.

appendChunk(byte[] bytes)

Syntax

public void appendChunk(byte[] bytes);

Parameters

bytes The binary data to append.

appendChunk(char[] chars)

Syntax

public void appendChunk(char[] chars);

Parameters

chars The characters to append.

appendChunk(String chars)

Syntax

public void appendChunk(String chars);

Parameters

chars The string to append.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.