Home > Advanced Programming Techni... > Using Collections > Updating Collection Members
You can update collection members by calling the UPDATE_MEMBER
procedure and referencing the desired collection member by its sequence ID, for example:
APEX_COLLECTION.UPDATE_MEMBER ( p_collection_name => collection name, p_seq => member sequence number, p_c001 => member attribute 1, p_c002 => member attribute 2, p_c003 => member attribute 3, p_c004 => member attribute 4, p_c005 => member attribute 5, p_c006 => member attribute 6, p_c007 => member attribute 7, ... p_c050 => member attribute 50); p_clob001 => [CLOB member attribute 1],
The UPDATE_MEMBER
procedure replaces an entire collection member, not individual member attributes. This procedure causes an error if the named collection does not exist. For example:
Use the p_clob001
parameter for collection member attributes which exceed 4,000 characters.
If you want to update a single attribute of a collection member, use the UPDATE_MEMBER_ATTRIBUTE procedure
, for example:
APEX_COLLECTION.UPDATE_MEMBER_ATTRIBUTE( p_collection_name => collection_name, p_seq => member sequence number, p_attr_number => member attribute number, p_attr_value => member attribute value )
APEX_COLLECTION.UPDATE_MEMBER_ATTRIBUTE( p_collection_name => collection_name, p_seq => member sequence number, p_clob_number => CLOB member attribute number, p_clob_value => CLOB member attribute value );
Calling the UPDATE_MEMBER_ATTRIBUTE
procedure causes an error if the named collection does not exist.
Note that the only valid value for the p_clob_number
parameter is 1.