Sample TAPI APEX Application

If you attended my presentation at AUSOUG Perth earlier this month, or if you’ve had a peek at the slides, you may be interested in a more concrete demonstration of the ideas presented. So if you’d like to install and play with a sample application that includes a TAPI generator, feel free to download this (EDIT: updated, see below).

Disclaimer: this is provided for information (and entertainment) purposes only.

Oracle Application Express 4.2.2 or later

Read the README file for installation instructions.


If you’re only interested in the schema-level TAPI and not the APEX application, the zip file includes the DDL script that you can run directly in a schema without requiring Apex.

EDIT (18/11/2014): updated sample code to do the right thing in WHEN OTHERS triggers.

EDIT (20/11/2014): updated sample code with a further example for a FK to a table, which doesn’t use a surrogate key. Also added an exception handler to the Apex application.

EDIT (2/12/2014): added Grid Edit for event types, as an example of how a tabular form might work with a TAPI; added deployment package; moved code to Bitbucket.

EDIT (16/02/2014): upgraded to APEX 5, plus numerous improvements – refer to:

More updates and improvements will be added in the future – watch this space.

Help for your keyboard users
Why Kyte Tolerates Poor Questions


  1. Hello Jeff,
    I am not sure if I used TAPI right before. The main problem that I have experienced is that whenever I needed to add a new column to the table, I have to re-create the Table Package again, then add the item of that column; then modify the Process in APEX. So, I think just typing our own code on Apex Process is much easier to maintain ?

    • Hi Fateh, thanks for your comment.

      The idea behind generating the TAPI is to do *most* of the typing for you while the data model is being designed and tested. After you start customising each TAPI, however, it doesn’t make sense to re-generate the TAPI (otherwise you’ll have to redo all the customisations).

      The idea is that adding a new column to a table is *relatively* uncommon, so having to add it to the TAPI is not normally a big deal. Whether you use a TAPI or not however doesn’t make much difference – you will still probably add the field to the Apex report and form, and adding a bit of extra code to the package is not much more work.

      If the code is in your Apex Process, however, it might be referred to in multiple Page processes if the table is used in more than one page in your Apex application – so when the table changes, you might have to change it in every Process that refers to it. If this code is defined once in the TAPI, you only have one place you need to update.

      Your mileage may vary – and every environment has different requirements – meaning you have to think about what will work best in your situation.

Leave a Reply

Your email address will not be published / Required fields are marked *