Designer Table APIs

Hi All,
Anybody has done projects using Designer Table APIs? We are currently in dilemma if we would implement the Table API or just create our own database triggers. We'll be deploying oure application thru 9iAS.
What are the advantage and disadvantages with the Table APIs?
Any feedback would be highly appreciated.
TIA,
Remar

I have recently completed a large project for a government department using Design with the Table API (TAPI). While this approach has many advantages, there are some problem spots. The main one is that error handling performed by cg$errors package is not very intuitive. It can be difficult to troubleshoot code imbedded in the TAPI.
That being said, I do like using the TAPI, I could not imagine coding for a large project that is Designer based without it now. It just may not be for everyone.
Steve Brown

Similar Messages

  • Ever used the Designer Table API (TAPI) with object type in the DB?

    Hi all,
    We are trying to generate the Oracle Designer table API of a table that has a column defined by an object type. It works without problems if that column always has a value (is instantiated in object term). The problem is when we update a row where the column is null (all attributes of the object are null thus the object is not instantiated).
    The "before update row" trigger of the Table API fails with error "ora-30625-method dispath on NULL SELF argument is disallowed".
    The code that fails is the following:
    cg$ind.TFO_DESCRIPTION :=(:new.TFO_DESCRIPTION IS NULL AND :old.TFO_DESCRIPTION IS NOT NULL )
    OR (:new.TFO_DESCRIPTION IS NOT NULL AND :old.TFO_DESCRIPTION IS NULL)
    OR NOT(:new.TFO_DESCRIPTION = :old.TFO_DESCRIPTION) ;
    In this example, cg$ind.TFO_DESCRIPTION is a boolean and the TFO_DESCRIPTION column is based on an object type.
    Thanks for any feedback or suggestions

    For a solution to this problem: I set down to write a relatively simple and small piece of code that we can use as post compiler or post generator. After we generated one or more TAPIs, we can run this post compiler to remedy the problem the TAPI has with Merge operations. The post compiler will fix the PL/SQL inside the database. It reads the TAPI objects using dbms_metadata, makes the simple change by manipulating the PL/SQL source and then recreates the objects using execute immediate. Using this post compiler, it takes but a few seconds to fix the merge flaw in all TAPIs in your application.
    http://technology.amis.nl/blog/index.php?p=842

  • Table API and Generated forms

    I have been told that Oracle Designer Table API (Application
    Programmer Interface) disables default functionality of querying
    records in a Headstart generated form, due to limitations with
    Designer. I am unable to find a bug number for this fault and was
    wondering if you could please point me in the right direction.
    Thank you
    Afe Ogun
    null

    Afe,
    The Oracle Designer Table API can be used as both the data target
    (INS, UPD, DEL) and data source (QRY). You do this by setting
    the data target and data source to 'Procedure' (instead of
    table). When it is used as the data source, you cannot enter
    query criteria in your form. You might want to use 'Procedure'
    as your data target, but continue to use 'Table' or 'View' as
    your data source. This is not a bug, but is just how the various
    options work together. It also has nothing to do with
    Headstart.
    You might want to look into the Oracle Designer online help or
    contact the Designer discussion group on Metalink.
    Regards,
    Lauri
    Afe Ogun (guest) wrote:
    : I have been told that Oracle Designer Table API (Application
    : Programmer Interface) disables default functionality of
    querying
    : records in a Headstart generated form, due to limitations with
    : Designer. I am unable to find a bug number for this fault and
    was
    : wondering if you could please point me in the right direction.
    : Thank you
    : Afe Ogun
    null

  • Capture customizations to a trigger or table API in designer

    Have a table with a column value (inv.inv_id) that is produced by a sequence. I would like to be able to know the inv_id of the recently added record to the table without re-querying the table. As an initial hack of the AIR trigger on the table (produced by Designer), I am capturing the new inv_id as records are added to the inv table by calling my own package interface that I plan to use in the application:
    -- Application_logic Post-After-Insert-row <<Start>>
    gid_inv.SET_ID (cg$rec.INV_ID) ;
    -- Application_logic Post-After-Insert-row << End >>
    I cannot figure out where to capture this customization in Designer so that I can automate the generation of this trigger. I would be happy to move the customization to the table API, again, if I could find a logical place to place and capture the customization. I have briefly looked at capturing database objects in Designer via the declaration, OS file method, free format method, and declarative method, but they do not appear to be the choice for Designer-generated objects like the table API or table triggers.
    Any ideas? Thank-you in advance!
    null

    I think it might not be efficient,Try it, it will be as efficient as any trigger. There are also workspace features built in to Oracle that do this kind of thing.
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14253/long_intro.htm#ADWSM010

  • Designer 6i: Generate table API

    During compilation of the package created, I got de following melding:
    "Creating API Package Body for Table 'Table_name' Warning: Package Body created with compilation errors."
    In the package body the table API generates "TYPE sqlInd_type IS RECORD"
    without comma's between de columns.
    Please help.
    M. Moussa

    There are no any reserved words in the table definition.
    The complete TYPE declaration:
    TYPE sqlInd_type IS RECORD ( OPE_MACHTIGING INTEGER := 0 OPE_STATUS INTEGER := 0 OPE_WIJZE_VAN_BETALING INTEGER := 0 OPE_STATUS_BETALING INTEGER := 0 );
    Thank you in advance.
    Moussa

  • Using Design-Time API problems

    I've been using the design time API to create an effect similar to that achieved in the examples section of the User guide for the HtmlDataTable. I'm not having any luck with my beanCreatedSetup method. I've done simething similar to the example and have created DesignBeans as table columns but in my examplecode the JSP code is not correct. In the JSP none of the children elements appear as children of the table,. I'm passing in the correct parent design bean when I call createBean, so I'm not sure what I'm doing wrong.
    My code is pretty much the same as in the example.
    Any ideas would help. Or a look at the complete source to HtmlDataTableDesignInfo.
    Don

    I was looking for a more immediate response to this specific problem, the other thread was a request for better examples in the docs. They are related, a complete example could solve my problem, but I'm nore sure there isn't a problem with the createBean() call. No matter what I do, I can't create a bean for component that get's persisted as a child component of a parent. In this case the parent DesignBean is derived from HtmlTableData and I'm trying to add children DesignBeans that are columns. After adding them they are persisted into the jsp page but not as children of the table component.
    Don

  • Settings for generating table APIs

    HI i was wondering if there are settings for Designer for generating the table APIs, that determine which error messages are handled by cg$errors and which are not.
    For 2 of my tables in Designer the messages for the foreign key constraints are omitted when I generate the table API.
    I am talking about the procedure err_msg, some of the foreign keys are checked but some are not, code that looks like this is generated:
    ELSIF (con_name = 'AGR_ICO_CPY_FK') THEN
    cg$errors.push(nvl(AGR_ICO_CPY_FK
    ,cg$errors.MsgGetText(cg$errors.API_FK_CON_VIOLATED
                             ,cg$errors.APIMSG_FK_VIOLAT
    ,'AGR_ICO_CPY_FK'
    ,'INTERNATIONAL_COLL_PARTIES')),
    'E',
    'API',
    cg$errors.API_FK_CON_VIOLATED,
    loc);
    but code that should look like this is not:
    ELSIF (con_name = 'AGR_AGT_CPS_FK' AND type = cg$errors.ERR_DELETE_RESTRICT) THEN
    cg$errors.push(cg$errors.MsgGetText(cg$errors.API_DEL_RESTRICT, cg$errors.ERR_DEL_RESTRICT, 'INTERNATIONAL_COLL_PARTIES', 'AGREEMENTS'),
    'E',
    'API',
    cg$errors.API_DEL_RESTRICT,
    loc);
    I am not very familiar with table APIS so I don't know which type of foreign key would lead to the first bit of code and which type would lead to the second bit. In Designer I see no difference.....
    Can anyone help me?

    Hi Wendy,
    "The code for the foreign keys that point to me is not generated".
    That code must be visible in the TAPI of the other table.
    Just checking: Do you see in Designer some foreign keys in your table for which there is no code generated in the TAPI (part err_msg)?
    What packages do you see where "the code for those foreign keys that point to me" is visible? I suppose that is TAPI of the other table, isn't it?
    Anyway: in Designer there are not that much options for TAPI generation. I do not know whether this has been changed in the last Designer versions.
    Good luck,
    Lennart

  • TABLE APIs in Jdeveloper

    Jdeveloper 10g on Windows XP
    Very new to this tool and exploring it for DB model/db design functionality. Coming from designer background, is there a way to generate Table APIS for the generated entities in Jdeveloeper? I searched this forum, but one solution was where the author talked about redoing the plsql api package in Java. Thats not what I am looking for. I would prefer to have the plsql api package generated via Jdeveloper?
    (As much little that I know about this, I think Jdeveloeper does support plsql)
    If so, how can we do this..If not, whats the alternative? Would appreciate some pointers where I can read/dig this further.
    Thanks
    SR

    SR,
    No, there is not really any function in JDev to generate PL/SQL table API's. I did see a paper presented at the UKOUG earlier this year where someone had used ADF Business Components with table API's, but they had done that by writing a code generator that generated all of the java code (much like what you've already found).
    John

  • Create a Navigational Hierarchy for filtering with the Table API

    Hello,
    I've built a WAD report acourding to the how to document: "Create a Navigational Hierarchy for filtering with the Table API".
    It works great but i dont know How to make the hirarchey to show the key and the text.
    Please Advice.
    David

    Hi Kenneth,
    please have a look in the source of the executed Web Application. What is inside of the <div> with the id filter?
    You should also find a td tag with id hier_xyz with xyz the filter inside of the <div>-Tag with id filter.
    Also check whether you have a javascript error.
    Have a look on the Javascript function set_style. Perhaps you can paste it here, than I can have a look.
    Heike

  • Merge API stub for 'Generate Table API...'?

    Hi,
    Has there been a request for a stub in the menu option 'Generate Table API...' that creates a merge procedure? If it generated the MERGE command for a given table that would be great and even better than trying to call the UPD procedure, trap the does not exist error and then call the INS procedure.
    The key to making this work is by passing the parameters for the actual match to the MERGE statement via the DUAL table in the source definition of USING clause. By doing this via the primary key of the table drives the cost for this procedure to unique scan via the PK which is 1 (one) logical I/O for the lookup and the decision to do an insert or update. The overall cost should be around 4.
    Thanks,
    ScottK
    The general pattern could be:
    PROCEDURE mrg (
    p_pk_col_1 IN table_name.pk_col1%type
    ,p_pk_col_n IN table_name.pk_coln%type
    ,p_non_pk_col1 IN table_name.non_pk_col1%type
    ,p_non_pk_coln IN table_name.non_pk_coln%type
    ) IS
    BEGIN
    MERGE INTO table_name target
    USING (SELECT
    p_pk_col1 alias_pk_col1
    ,p_pk_coln alias_pk_coln
    FROM dual) source
    ON ( source.alias_pk_col1 = target.pk_col1
    and source.alias_pk_coln = target.pk_coln)
    WHEN MATCHED THEN UPDATE
    SET target.non_pk_col1 = p_non_pk_col1
    ,target.non_pk_coln = p_non_pk_coln
    WHEN NOT MATCHED THEN INSERT
    column list
    VALUES
    parameter list
    END;
    Edited by: ScottK on Aug 11, 2011 3:17 PM
    Edited by: ScottK on Aug 11, 2011 3:48 PM
    Edited by: ScottK on Aug 11, 2011 3:49 PM

    You can always request this at the SQL Developer Exchange, so other users can vote and add weight for possible future implementation.
    Regards,
    K.

  • Designing table for client/server situation ....

    I am designing table that will be accessed by concurrent users. It's structure is given below:
    AccountID number(30) Primary Key
    AccountName text(50)
    I have a sequence named: "seqAccID" which increments AccountID and stores new ID.
    I want to know what changes must be done in the table so that if concurrent users are creating entering in the same table and press enter at the same time there is no possibility of error: "Primary Key violation".

    I have a sequence named: "seqAccID" which increments
    AccountID and stores new ID.
    I want to know what changes must be done in the table
    so that if concurrent users are creating entering in
    the same table and press enter at the same time there
    is no possibility of error: "Primary Key violation".You don't need anything, sequences guarantee the uniqueness (that's their purpose). See http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14220/schema.htm#sthref883
    If you use your own counter instead, then the For Update suggestion is correct.

  • Ever used the Table API (TAPI) with object type in the DB?

    Hi all,
    We are trying to generate the table API of a table that has a column defined by an object type. It works without problems if that column always has a value (is instantiated in object term). The problem is when we update a row where the column is null (all attributes of the object are null thus the object is not instantiated).
    The "before update row" trigger of the Table API fails with error "ora-30625-method dispath on NULL SELF argument is disallowed".
    Any of you guys made it work? If so, how?
    Thanks

    user8879206 wrote:
    Hi friends,
    I have a procedure with object type IN OUT parameters which is used for fetching status. We are calling this from Java. But I want to call it from oracle for testing purpose. I am trying from my end but not able to do it as of now. This is the first time I am dealing with object type.We need more information. What is wrong? Your code looked okay and you did not mention any Oracle errors. What is happening that should not be or not happening that should be?
    You can call the procedure with a simple call in PL/SQL but will not be able to use it in SQL because 1) it is a procedure and 2) it has an OUT argument. A sample call should look something like (untested)
    declare
       x rec2;
       y rec3;
    begin
      --use the arguments rru was defined with as the arguments in the same order: types rec2 (x), rec3 (y)
      rru(x,y);
    end;>
    Any help would be appreciated.
    Details are given below.
    CREATE OR REPLACE TYPE REC1 AS OBJECT
    (RELAY_USAGE VARCHAR2(30)
    ,STATE VARCHAR2(1)
    TYPE REC AS TABLE OF REC1;
    CREATE OR REPLACE TYPE REC2 AS OBJECT
    (GSRN VARCHAR2(18)
    ,METERING_POINT_NAME VARCHAR2(80)
    ,RELAYS REC)
    CREATE OR REPLACE TYPE REC3 AS OBJECT
    (INFO VARCHAR2(2000)
    ,STATUS NUMBER
    PROCEDURE RRU(
    rcRelayControl IN OUT REC2
    , rcResp IN OUT REC3)
    IS
    BEGIN
    APKG.GetDetails(rcRelayControl, rcResp);
    IF rcResp.Status = BPKG.iStatusFailure THEN
    rcResp.Info := BPKG.Get_Message('20889', rcResp.Info);
    END IF;
    END RRU;
    How to call this procedure in oracle?
    Thanks.

  • Table API Extension for Oracle SQL Developer

    I just created small project [Table API Generator for Oracle|http://code.google.com/p/tapig/].
    Idea is to only maintain tables and generate table API (TAPI) packages for data manipulation.
    Generated:
    - insert, update, delete, querying procedures
    - documentation based on table columns comments
    Do you think it will be useful to have custom Table API Generator as extension for Oracle SQL Developer?

    Never used them myself and quite legacy, but I'm sure there's still a lot of people using them and the basic idea is quite nice.
    This would also qualify perfectly as a User Defined XML Extension for sqldev; little work but big results. Even if you were the only one using it, it would still pay off.
    Have fun,
    K.

  • Can I use Reports Server Queue PL/SQL Table API to retrieve past jobs ?

    Hi all,
    Can I use Reports Server Queue PL/SQL Table API to retrieve past jobs using WEB.SHOW_DOCUMENT from Forms ?
    I have reviewed note 72531.1 about using this feature and wonder if i can use this metadata to retrieve past jobs submitted by a user.
    The idea would be to have a form module that can filter data from the rw_server_queue table, say, base on user running the form, and be able to retrieve past jobs from Report Server Queue. For this, one would query this table and use WEB.SHOW_DOCUMENT.
    Is this possible ...?
    Regards, Luis ...!

    Based on that metalink note and the code in the script rw_server.sql, I am pretty sure that by querying the table you would be able accomplish what you want... I have not tested it myself... but it looks that it will work... you have the jobid available from the queue, so you can use web.show_document to retrieve the output previously generated...
    ref:
    -- Constants for p_status_code and status_code in rw_server_queue table (same as zrcct_jstype)
    UNKNOWN CONSTANT NUMBER(2) := 0; -- no such job
    ENQUEUED CONSTANT NUMBER(2) := 1; -- job is waiting in queue
    OPENING CONSTANT NUMBER(2) := 2; -- opening report
    RUNNING CONSTANT NUMBER(2) := 3; -- running report
    FINISHED          CONSTANT NUMBER(2) := 4; -- job has finished
    TERMINATED_W_ERR CONSTANT NUMBER(2) := 5; -- job has terminated with

  • Generate Table API

    Is it possible to modify/customize the code generated by the 'Generate Table API' menu path, so as to add additional functionality etc.
    Thanks
    Paul

    There are no any reserved words in the table definition.
    The complete TYPE declaration:
    TYPE sqlInd_type IS RECORD ( OPE_MACHTIGING INTEGER := 0 OPE_STATUS INTEGER := 0 OPE_WIJZE_VAN_BETALING INTEGER := 0 OPE_STATUS_BETALING INTEGER := 0 );
    Thank you in advance.
    Moussa

Maybe you are looking for