TibrvMsg.updateField()

Method

Declaration

void updateField(TibrvMsgField field)
  throws TibrvException

Purpose

Update a field within a message.

Remarks

This method copies the new data into the existing message field. All related convenience methods behave similarly.

This method locates a field within the message by matching the name and identifier of field. Then it updates the message field using the field argument. (Notice that the program may not supply a field object with a different field name, field identifier, or datatype.)

If no existing field matches the specifications in the field argument, then this method adds the field to the message. Update convenience methods also add the field if it is not present. It is illegal to add a field that has both a null field name, and a non-zero field identifier.

The type of the existing message field and the type of the updating field argument must be identical; otherwise, the method returns the error status code TibrvStatus.INVALID_TYPE. However, when updating array or vector fields, the count (number of elements) can change.

Parameter

Description

field

Update the existing message field using this field.

It is illegal to add or update a field with null data.