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.
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.
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.
public void appendChunk(byte[] bytes);
bytes | The binary data to append. |
public void appendChunk(char[] chars);
chars | The characters to append. |
public void appendChunk(String chars);
chars | The string to append. |