When Uniface inserts or updates a record it always supplies all fields defined in the field list. That behavior can result in inefficient operations, especially when the table contains a lot of segmented fields. Uniface should build the field list for \'write\' operations dynamically and only include fields that actually need to be written. Fields that have not been specified (for inserts) or modified (for updates) should not be included.

Use Case




Database Drivers

Operating System

Not Applicable



2 thoughts on “Dynamic field list for update/insert”

  1. Alternatives?

    1st – I would suggest looking at your table design to start with. If you have a lot of segmented fields, it sugggests a denormalized model.
    For example, I’ve seen a customer record containing 4 addresses, rather than breaking the addresses out into a separate address table
    and linking the addresses back to the customer with customer number and an address type.

    2nd – make use of the stored procedures / packages Uniface (can) generate for I/O. There’s a reason they’re there….

    3rd – play the game of ‘duplicating’ your entity into a smaller subset of fields – (CUSTOMER dupl to CUSTOMER_ALIAS1).
    And I mean duplicate, not functional subtype.
    Remove the fields you don’t want / need for this (any) particular function. Your component refers to CUSTOMER_ALIAS1.
    Map CUSTOMER_ALIAS1 to CUSTOMER in the ASN file.
    NB!If you’re running on a record management system or your DBMS has a CRC built in for the record,
    this will not work.

    HTH – Knut

  2. Sorry, I forgot – the concept of only inserting fields with values in them (as entered / defined) in the component, –
    referential integrity constaints are often defined in the database these days – so I’d say you’d be up against problems there too.


Leave a Reply