Master Detail performance problem

I have a demo master detail application which was built using the Application Express Wizard (APEX v3.2) which is performing badly under a particular situation.
The master detail is a workers table (46000 rows, pk index on id) and a licence table (48000 rows, fk index on wkr_id)
The generated application opens with a multi row report from a workers table. Clicking on the edit button on a worker record takes you to a master detail page which is the worker record and one or more licence records.
If the report page is run and you click the edit button to go to the master detail page, then you click on the next and previous records buttons the performance is fast - around 0.3 seconds.
However if you use a search term in the report page to find workers by name. The report page renders quite fast but then clicking on the edit button to go to the master detail worker record page is slow - around 5.5 seconds at best. This scales badly too. Clicking next and previous buttons at this point is similarly very slow.
4 sql statements are appearing in V$SQLAREA when the next button is clicked as follows:
1. SELECT "ID", LEAD("ID",1) over (order by "ID") next, LAG("ID",1) over (order by "ID") prev
FROM "PROD"."WORKERS"
2. SELECT "ID","LIC_ID","SURNAME", "FIRST_NAME","OTHER_NAME",
FROM "PROD"."WORKERS" WHERE "ID" = :B1 FOR UPDATE;
3. SELECT "ID","LIC_ID","SURNAME", "FIRST_NAME","OTHER_NAME",
FROM "PROD"."WORKERS" WHERE "ID" = :B1;
4. SELECT NULL "CHECK$01", "ID" "ID", "WKR_ID" "WKR_ID", "LIC_NO" "LIC_NO", "ISSUING_STATE" "ISSUING_STATE"
FROM ( SELECT /*+(WORKER_LICENCES eli_wli_wkr_fk) */
"ID", "WKR_ID", "LIC_NO", "ISSUING_STATE"
FROM "PROD"."WORKER_LICENCES"
WHERE "WKR_ID" = :P2_ID)
These queries run like lightning when executed directly on the database and are as generated by the APEX wizard.
The same application generated in Oracle Forms 10 on the same database is super fast (< 0.2 seconds.)
Can anyone advise where the problem may lie.
Thanks
Phil Gray
Edited by: graypz on Aug 18, 2009 6:50 PM

Thanks for that Andy
This got me to thinking. The number of columns that I have shown is pruned down drastically from the actual 50 columns in the table - which would make indexing out of the question.
The classic presentation of the home page of the generated application allows a search field which does searching in any column for a search term :P1_REPORT_SEARCH. The region source query has a monster "where clause" to cater for that, something like this:
where (
instr(upper("LIC_ID"),upper(nvl(:P1_REPORT_SEARCH,"LIC_ID"))) > 0 or
instr(upper("SURNAME"),upper(nvl(:P1_REPORT_SEARCH,"SURNAME"))) > 0 or
instr(upper("FIRST_NAME"),upper(nvl(:P1_REPORT_SEARCH,"FIRST_NAME"))) > 0 ... etc for the whole 50 columns
Sure enough, when I run that query direct in the database it performs badly - around 4.5 seconds.
My first cut of a workaround is to restrict the columns that can be searched to those with an index (LIC_ID, SURNAME) and to remove the rest of the generated where clause. Then to edit the P1_REPORT_SEARCH label to say "Search for Lic Id or Surname".
This brings about an immediate sudden increase in speed of the query.
The next part is still unresolved. The master detail form "next" "previous" buttons do not perform too well - and the records are not in context of the search that was run on the home page. My workaround is to remove the buttons as I don't have enough knowledge to attack that yet.
I may be expecting too much of the APEX wizard, but hopefully someone can direct me to a way of resolving this.
Regards
Phil Gray

Similar Messages

  • Master /Detail create problem

    hi,everyone:
    Firstly to say sorry for my bad English.
    Now I have a question:
    I'm working in JDeveloper 10.1.3 .The model layer is SessionEJB /Toplink ,and the view layer is JSF. I have a data structure :
    HrUnit : Master
    HrHuman : detail
    HrKnowledge : detail
    the <HrHuman>'s PRIMARYKEY is <ID>,and the <HrKnowledge>'s FOREIGN KEY is <RYID>.
    and I want to make a page to insert a new row on <HrKnowledge>. I drag the <hrKnowledgeCollectionIterator> into the page as <ADF Creation Form>, the page run fine.
    next step, I make <persistEntity> binding to the <submit button> and the parameters(entity) is
    ${bindings.hrKnowledgeCollectionIterator.currentRow.dataProvider}.
    when i run the page , i get a wrong . i get the SQL in the <Unit of work > is
    "INSERT INTO HrUnit ....."
    i create a direct mapping for the detail's foreginkey in toplink,and when i "rebuild" the map ,it gives me a warning. This warning affect my custom code in EJB,it can't work correctly. So i can't use this way in my question.
    Re: Master /Detail  create problem
    I beg your help.
    Thanks. and very very thanks.

    Hi,
    I am not an expert in TopLink, but it appears to me that the TopLink model is causes your problems not ADF. There is a TopLink forum here on OTN that could give you a helping hand on this issue.
    The following tutorial explains the use of TopLink in ADF
    http://www.oracle.com/technology/obe/obe1013jdev/10131/10131_adftoplink/master-detail-edit_page_adf_toplink.htm
    Frank

  • Master-detail strange problem

    I've got strange problem to solve. I have master-detail tables in DB: dept and emp (1:n), emp has FK deptno from dept. I've created business component package for these tables through the wizard. Link and association was created automatically. When i delete master, i also want remove details records, so i've checked association properties Composition Ass., Implement Casc. Del. and Lock Top-level Container. But during testing app. module, i can remove master but i cannot commit changes to DB. I always receive
    (oracle.jbo.DMLException) JBO-26041: Failed to post data to database during "Delete":SQL Statement "DELETE FROM DEPT Dept WHERE DEPTNO=:1".
    --------- LEVEL 1: DETAIL 0 --------
    (java.sql.SQLException) ORA-02292: integrity constraint (SCOTT.FK_DEPT_DEPTNO) violated - child record found
    if i add to FK constraint the property 'cascade on delete', then it works correctly, BUT in real application i have just small possibility to change DB design, and anyway I think this should work without changing db (in Oracle Forms it does). We use Oracle9i 9.2.0.3 and JDeveleper 9.0.3.1. Could please anybody explain to me what i forgot to do? Thanks for any suggestion.

    It seems, in the JDev version you have cascade delete has not been implemented in the MT. You have to manage such deletes from the Bc4J client side. Or you may override remove() method on the master entity and perform remove on all composition details and then call super.remove(). This way due to composition, the details will be removed first from the db and then the master will be removed to avoid the FK constraints. OPtionally if your db model has cascade delete constraint, then select the cascade-delete checkbox on the composition association so that detail's DML is not invoked as an optimization.

  • Master-Detail Relationship problem

    I've spent 1.5 days already trying to solve this problem. I'm creating a JClient application using BC4J with a Master-Detail relationship. The relationship between tables is a many-to-many thru an intersection table. I've gotten my master and detail data to show with columnar form data in the top(master) panel and table data in the lower(detail) panel. My problem is that each time I get a master record that contains more than one detail record, each time I click the next navigation button in the master pane it will remain on the master record for the number of detail entries. For example, if a master record has 3 children, then I must click the next button 3 times to move to the next master record. I know that it has something to do with the way the entities are joined but I can't figure out how to join them any other way. Can anyone give me a hint how I can make the master panel only show one record for each Master-Detail relationship (even though the intersection table says its a many-to-many)?
    Thanks,
    Mark

    Apparently, I was making things much more complicated than they needed to be (rather, JDev was). My first attempt at MD relationships, I followed the examples in the help files. JDev created VO's, Entities, Assoc's, View Links, etc... Everything but the kitchen sink! After researching a bunch more, I found that the only thing I needed to do was to create my view objects to display exactly what I wanted to see in my panel regardless of whether it was a parent or a child. Once I had the view objects straight, then I could connect them using a view link and JDev handled the rest. Pretty slick but, I wish there was some better documentation. My next problem is that I'm trying to make this a Master-Detail-Detail-Detail window. The master needs to be a JComboBox, displays only a date, and needs to appear in the same panel as it's child. The 1st child will have a navbar that cycles through a bunch of orders based on the date from the combo box. The order panel's child is in the lower panel and displays the order detail items. It also has a navbar. The lower detail panel needs to have a split pane with the upper part showing the order detail and the lower part showing the materials used in making up that order detail item.
    So far, I've got the first 3 parts done (ie. combobox, orders, and details). For the combobox, I used a JComboBox navigationbinding. It shows the correct date, but my control is always disabled. I can't figure out why the combobox is always disabled. The enabled property is set to true. Anbody have any clues?
    Thanks,
    Mark

  • Master Detail Form - Problem using built in wizard

    Hi There
    We are working on Application express 2.2.
    We are facing problems for a master detail form using Wizard. The
    details are as follows : >>
    1) Master table : TS_ENTRY_TXN
    trans_id P.K.
    2) Detail table : TS_ENTRY_TXN_DETAIL
    a)trans_id
    b)sub_trans_id Composite P.K.(trans_id,sub_trans_id) & these are
    based on sequences.
    If i try to build a master detail form using the Wizard, the options
    for providing P.K. for master & detail are listed which we used.
    As it is a master detail form, we want to carry trans_id to the detail
    for updations/insertions which doesn't happen.
    The MRU fails with oracle error :
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1,
    ORA-01400: cannot insert NULL into
    ("TS_APEX"."TS_ENTRY_TXN_DETAIL"."ENTRY_ID"), insert into
    "TS_APEX"."TS_ENTRY_TXN_DETAIL" ( "ENTRY_ID", "SUB_ENTRY_ID",
    "SMR_ID", "TASK_ID", "SUB_TASK_ID", "TIME_SPENT", "REMARKS") values (
    :b1, :b2, :b3, :b4, :b5, :b6, :b7)
    Is there any other way to build master detail wihout wizard.
    Could you please suggest us better way to complete this task.

    If I'm reading this correctly, then one of the columns in your detail tables' primary key is also the foreign key pointing to your master table? If that's the case, then that's not supported by the wizard. For the wizard generated master-detail form to work properly, you'll have to have a foreign key column in your detail table which is not part of your detail table's primary key.
    Hope this helps,
    Marc

  • Binds in Master/Detail Reports: Problems and Solutions

    I've been trying to use bind variables in the master report of master/detail reports with multiple detail reports; but, I've been getting a problem with the detail reports not displaying data.
    Here's a sample sequence of events:
    1) Select the master/detail report under User Defined Reports.
    2) Connect to a DB (if necessary).
    3) Enter any value(s) for the bind(s) for the master report.
    4) Select a row in the master report.
    5) The currently selected detail report displays column names and data.
    6) Select a different detail report.
    7) Nothing displays except column names.
    8) Select a different detail report.
    9) Nothing displays except column names.
    10) Click the currently selected row in the master report.
    11) Now the current selected detail report displays (column names and) data.
    I have found that if, I am more selective with my bind variable names, I can get things to work as expected.
    First, let me show an example of some SQL that was giving me problems.
    Master Report:
    select distinct OWNER
    from SYS.ALL_OBJECTS
    where (OWNER like :OWNER or :OWNER is NULL)
    Detail Reports:select *
    from SYS.ALL_OBJECTS
    where OWNER = :OWNER
    and OBJECT_TYPE = 'INDEX'replacing 'INDEX' with other values for the other detail reports.
    (I did have this problem with other SQL too but hopefully this SQL will run on everyone's DB.)
    The first solution I found was to change the name of the bind in the master to something like OWNER_BIND.
    The second solution I found was to change the master to
    select distinct OWNER as POWNERand change the detail reports to
    where OWNER = :POWNERAnother solution might be to adjust the bind variable names' case, but I didn't look at that.
    While I was trying different things to get this to work, one of the goofy things that SQL Developer did was add <binds>s to the <query>s of the detail reports in my UserReports.xml. IIRC, it even did this to a master/detail report that I was not editing. So, if you run into this problem, you might want to open your UserReports.xml and clean it up by hand. (Actually, that might be good advice for other problems too.)
    Tip: I've had other problems with my User Reports such as disappearing reports; so, not only do I regularly make copies my UserReports.xml, I also save report(s) into separate XML files and use Tools > Preferences... > Database > User Defined Extensions to add REPORT-type extensions to SQL Developer. (Kris Rice talked a bit about REPORT-type extensions in this blog entry: http://krisrice.blogspot.com/2006/11/xml-extension-points-reports.html)
    FYI: I'm using sqldeveloper-1.1.2.2579 on Windows XP w/ SP2. The DB is Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production.

    Here is the complete XML exported from a problem report. If you want to use this, save it as an XML file then import that file from within SQL Developer (ie, right-click on User Defined Reports and choose Import).
    Notice that there are <binds>s on the detail reports. They don't belong there; only the one on the master report belongs. (The <binds> is specified by the Binds tab when creating a report. They are for prompting the user for value(s) and you cannot do that in child reports.) Even if I removed the <binds>s from the detail reports before importing the XML file, I still see the problem. SQL Developer also ends up putting them back. I think that it might happen to each detail report individually as it is visited when using (ie, not editing) the master/detail report.
    <?xml version="1.0" encoding="UTF-8" ?><displays><display id="" type="" style="Table" enable="true">
         <name><![CDATA[Sad]]></name>
         <description><![CDATA[]]></description>
         <tooltip><![CDATA[]]></tooltip>
         <drillclass><![CDATA[null]]></drillclass>
         <CustomValues>
              <TYPE>horizontal</TYPE>
         </CustomValues>
         <query>
              <sql><![CDATA[select distinct OWNER as OWNER
    from SYS.ALL_OBJECTS
    where (OWNER like :OWNER or :OWNER is NULL)]]></sql>
              <binds>
                   <bind id="OWNER">
                        <prompt><![CDATA[OWNER (like)]]></prompt>
                        <value><![CDATA[NULL_VALUE]]></value>
                   </bind>
              </binds>
         </query>
         <display id="null" type="Detail" style="Table" enable="true">
              <name><![CDATA[INDEX]]></name>
              <description><![CDATA[]]></description>
              <tooltip><![CDATA[]]></tooltip>
              <drillclass><![CDATA[null]]></drillclass>
              <CustomValues>
              </CustomValues>
              <query>
                   <sql><![CDATA[select *
    from SYS.ALL_OBJECTS
    where OWNER = :OWNER
    and OBJECT_TYPE = 'INDEX']]></sql>
                   <binds>
                        <bind id="OWNER">
                             <prompt><![CDATA[OWNER]]></prompt>
                             <tooltip><![CDATA[OWNER]]></tooltip>
                             <value><![CDATA[NULL_VALUE]]></value>
                        </bind>
                   </binds>
              </query>
         </display>
         <display id="null" type="Detail" style="Table" enable="true">
              <name><![CDATA[PACKAGE]]></name>
              <description><![CDATA[]]></description>
              <tooltip><![CDATA[]]></tooltip>
              <drillclass><![CDATA[null]]></drillclass>
              <CustomValues>
              </CustomValues>
              <query>
                   <sql><![CDATA[select *
    from SYS.ALL_OBJECTS
    where OWNER = :OWNER
    and OBJECT_TYPE = 'PACKAGE']]></sql>
                   <binds>
                        <bind id="OWNER">
                             <prompt><![CDATA[OWNER]]></prompt>
                             <tooltip><![CDATA[OWNER]]></tooltip>
                             <value><![CDATA[NULL_VALUE]]></value>
                        </bind>
                   </binds>
              </query>
         </display>
         <display id="null" type="Detail" style="Table" enable="true">
              <name><![CDATA[PACKAGE BODY]]></name>
              <description><![CDATA[]]></description>
              <tooltip><![CDATA[]]></tooltip>
              <drillclass><![CDATA[null]]></drillclass>
              <CustomValues>
              </CustomValues>
              <query>
                   <sql><![CDATA[select *
    from SYS.ALL_OBJECTS
    where OWNER = :OWNER
    and OBJECT_TYPE = 'PACKAGE BODY']]></sql>
                   <binds>
                        <bind id="OWNER">
                             <prompt><![CDATA[OWNER]]></prompt>
                             <tooltip><![CDATA[OWNER]]></tooltip>
                             <value><![CDATA[NULL_VALUE]]></value>
                        </bind>
                   </binds>
              </query>
         </display>
         <display id="null" type="Detail" style="Table" enable="true">
              <name><![CDATA[SEQUENCE]]></name>
              <description><![CDATA[]]></description>
              <tooltip><![CDATA[]]></tooltip>
              <drillclass><![CDATA[null]]></drillclass>
              <CustomValues>
              </CustomValues>
              <query>
                   <sql><![CDATA[select *
    from SYS.ALL_OBJECTS
    where OWNER = :OWNER
    and OBJECT_TYPE = 'SEQUENCE']]></sql>
                   <binds>
                        <bind id="OWNER">
                             <prompt><![CDATA[OWNER]]></prompt>
                             <tooltip><![CDATA[OWNER]]></tooltip>
                             <value><![CDATA[NULL_VALUE]]></value>
                        </bind>
                   </binds>
              </query>
         </display>
         <display id="null" type="Detail" style="Table" enable="true">
              <name><![CDATA[TABLE]]></name>
              <description><![CDATA[]]></description>
              <tooltip><![CDATA[]]></tooltip>
              <drillclass><![CDATA[null]]></drillclass>
              <CustomValues>
              </CustomValues>
              <query>
                   <sql><![CDATA[select *
    from SYS.ALL_OBJECTS
    where OWNER = :OWNER
    and OBJECT_TYPE = 'TABLE']]></sql>
                   <binds>
                        <bind id="OWNER">
                             <prompt><![CDATA[OWNER]]></prompt>
                             <tooltip><![CDATA[OWNER]]></tooltip>
                             <value><![CDATA[NULL_VALUE]]></value>
                        </bind>
                   </binds>
              </query>
         </display>
    </display>
    </displays>

  • Master - Detail application problem navigation

    Hello everyone
    i have a problem with my proyect Master - Detail Application, i can't show more DetailViewController  in the xcode 4.2.
    in the MasterViewController have 4 options the first option show me a DetailViewController in the second option show me other DetailViewController, but the masterView must not do any navigation to DetailViewController only in the  right of DetailViewController
    best regards

    What application?

  • Master-Detail commit problem

    I have master detail scenario. I have two forms. First one for the master and the second for the detail. I am first inserting the master data and then i navigate to the other form to insert the detail data. If i make commit from the second form it works just fine, but i need to go back(using JSF navigation) to the first form and commit from there. When I'm doing that i get the following error: JBO-27102: Attempt to access dead view row
    I need solution to this problem
    Thanks
    Edited by: user2136329 on Dec 3, 2009 3:44 AM

    JBO-27102: DeadViewRowAccessExceptionReason: Trying to access a ViewRow which is part of an obsolete/invalid collection. This could happen if a reference to the ViewRow is held by some business logic while the containing view object was removed.
    Solution: Find the referenced ViewRow either by re-querying or using findByKey methods to get a valid reference to the ViewRow.
    >
    How are you creating your detail row - when you are navigating back are you doing a form submit to make sure that the data is submitted to view object..? If yes, try to get the handle to detail viewobject instance to check it holds new rows before commit..?
    ~Krithika

  • Master Detail FK Problem

    I have created a Master/Detail set of pages. Using just the wizard. This is the option that creates 3 pages:
    1-Master Page
    2-Master Page detail, show a summary of the detail page
    3-Form for detail
    The data is being added to the database but the Master Page foreign key (master table fk) is not populating at all. I can see the data in the table, but the FK that points back to the Master table is blank.
    Having a real problem with this, please advise.

    Steve,
    Firstly, good luck for Gustav, keep your head down and hope it doesn't hit too hard. I was just in New Orleans for ODTUG and obviously would hate to see you guys go through something like that again.
    Secondly, I was just looking through the patch notes for Apex 3.1.2, and spotted these bugs had been fixed -
    6999393 - Master Detail Wizard creates processes with incorrect sequence
    7013435 - MRU process in Create Application Wizard-generated master detail not working correctly
    7016267 - 3 page Master Detail should not allow edit of Foreign Key Field on Detail PageI'm not sure if any of them directly related to your problem, but it could be worth looking them up in Metalink (those are the Bug numbers) to see if they are, or alternatively do the upgrade and see if it fixes your problem.
    John.
    http://jes.blogs.shellprompt.net
    http://www.apex-evangelists.com

  • Master-detail form problem after upgrading to 4.1

    Hello,
    I have running Apex 4.0.2 instance on 11g2 database.
    After upgrading to Apex 4.1 I have a problem with all Master-detail forms.
    I'm able to open the one but detail region shows error 'failed to parse SQL query:
    ORA-00923: FROM keyword not found where expected'.
    All forms work correctly on 4.0.2 version.
    If I migrate that 'SQL Query (updateable report)' region to 'Interactive report',
    the form works fine on 4.1
    What could be a problem?
    Thanks
    Sasa

    Hi Patrick,
    I tried to make test application (the one master-detail page).
    But when I copy the page from my application to test application, copied page in test
    application works fine and because of that I didn't import test application to apex.oracle.com
    Strange thing is that the column in detail table FAK_ID in the page of original application has
    defined default value (P108_ID) but in the copied page in test application that column doesn't have
    defined default value!?
    I don't know if it's expected behavior...
    Anywav, even if I set default value of FAK_ID column in test application, application works as expected.
    I tried upgrade to 4.1 Apex version for three time but unfortunately I always got the same error in the master-detail page.
    BR
    Sasa

  • Master Detail form - Problems

    We are facing problems for a master detail form using Wizard. The details are as follows : >>
    1) Master table : TS_ENTRY_TXN
    trans_id P.K.
    2) Detail table : TS_ENTRY_TXN_DETAIL
    a)trans_id
    b)sub_trans_id Composite P.K.(trans_id,sub_trans_id) & these are based on sequences.
    If i try to build a master detail form using the Wizard, the options for providing P.K. for master & detail are listed which we used.
    As it is a master detail form, we want to carry trans_id to the detail for updations/insertions which doesn't happen.
    The MRU fails with oracle error :
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-01400: cannot insert NULL into ("TS_APEX"."TS_ENTRY_TXN_DETAIL"."ENTRY_ID"), insert into "TS_APEX"."TS_ENTRY_TXN_DETAIL" ( "ENTRY_ID", "SUB_ENTRY_ID", "SMR_ID", "TASK_ID", "SUB_TASK_ID", "TIME_SPENT", "REMARKS") values ( :b1, :b2, :b3, :b4, :b5, :b6, :b7)
    Is there any other way to build master detail wihout wizard.
    Could you please suggest us better way to complete this task.

    Hi San Mat,
    I would never recommend having a composite PK on any table. Use the sub_trans_id as the PK in its own right and have trans_id as a Foreign Key pointing to the master table.
    However, given your existing table structure, what you need to do is add a Default value for the ENTRY_ID field on the child table that points to the Page Item used for the PK field on the master table (you've said trans_id but do you mean ENTRY_ID??). On the column's Column Attributes page, set Default Type to Item (Application or page item name) and the Default to P1_ENTRY_ID (or whatever the name is of field is on the master table's form that holds the PK)
    When a new row is added to the child table, the ENTRY_ID from the master table is inserted automatically.
    Regards
    Andy

  • Master/detail blocks problem

    hi friends
    i have a problem with master/detail blocks in my form.
    i have two blocks one is master and the other one is detail
    i made a relation between these two blocks
    and my form works corectly
    but when i am in enter_query mode ,my cursor cannot go to detail block.
    so i can't search special records in detail block.
    is there any way to search detail block's value in form builder?
    is it true that in master/detail blocks we can serach records only in master records?
    any help would be appretiated.
    regards,
    shoja.

    When a Block is in Query Mode the cursor is restricted to it - there is nothing to stop you from Querying the Master and then navigating to the Detail and going into Enter Query mode in that block afterwards.
    If you need to enter Query Criteria that applies to both the Master And Detail then you'll need to build a specialist query screen using a Non DB block that gathers all of the criteria and then uses SET_BLOCK_PROPERTY on both the master and the detail to define the required results.

  • Master-detail null problem

    Hi,
    I'm having a problem with what I expected to be a simple master-detail form.
    I have a table of RELEASES based on a text RELEASE_ID pk. There are WORK_PACKAGES, to identify the chunks of work agreed with the customer - change requests, bug fixes etc. To identify when they are released, I have a link table RELEASE_COMPONENTS which is RELEASE_ID + WORK_PACK as a pk.
    I used the wizard - master table RELEASES, detail RELEASE_COMPONENTS and it queries fine, but if I try to create a new detail record, RELEASE_ID is not being populated and I get the message
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-01400: cannot insert NULL into ("DEL"."RELEASE_COMPONENTS"."RELEASE_ID"), insert into "DEL"."RELEASE_COMPONENTS" ( "RELEASE_ID", "WORK_PACK", "RECONCILED") values ( :b1, :b2, :b3)
    I just can't see anywhere in the processes where this should be set or can be set - help!
    Thanks
    Malcolm

    Don't know if I get points for answering my own question?
    Apex seems happier when all the tables have a sequential PK.
    In my original design, I went for my usual Oracle design of having mnemonic varchar2 keys, so for instance a customer called Joe Bloogs would have a key of BLOGGSJ or similar. The reaon being that in Forms, we always gave the users a choice of keying in the code directly rather than having to use an LOV. For full-time users on a large database, this creates quite a saving.
    APEX seems less happy with this sort of set-up. It did mean that in my small reference tables, I had to duplicate the PK so it was visible and start coding conditions so it could be entered but not amended, and the final straw was this master-detail not liking the composite key on the detail table from the two referenced tables. I added a sequence to this, and it just works.
    So - it's back to the drawing board and redesign everything from square one!
    Luckily, this is just an internal app to prove feasibility of replacing some of the systems with APEX applications.

  • Master detail refreshing problem

    Hi,
    below is my master - detail structure
    main master(level1) based IDCODE table
       |
        -->sub master(level2) based on IDCODE table
               |
               -->detail(level 3) based on IDSUBCODE table
    idno is the link between all three levelsnow iam getting problem at level2.when i create a record at level2...level1 is not pointing to my new record after commiting the record(even if query also manually)
    thanks
    KM

    ok.
    thereare two ways.
    foriegn key in db. if u had means, it may exposed as view link in model layer. (as u know)
    and if does not had that key means,.u may make associations or viewlink. to catch that.
    so you are using viewlink.
    that link based on same table.
    make tie up like this
    table1                        table1
      ||                               ||
        eid attribute                eid attribute.
        Did attribute                Did attribute.eid , Did should be primary key. no duplicates should not be there.
    like this you can try.

  • Master details page problem

    Dear all,
    I have problem with Master details page:
    If I change the catID after login, to other ID for other user its show me the content?!How can I restrict user to see only he’s content?!
    Please your help ASAP.
    Thanks and regards,
    FAIZ ALI

    It solved
    This is what i did:
    <%
    Dim WebsiteName
    Dim WebsiteName_cmd
    Dim WebsiteName_numRows
    Set WebsiteName_cmd = Server.CreateObject ("ADODB.Command")
    WebsiteName_cmd.ActiveConnection = MM_mybag_STRING
    WebsiteName_cmd.CommandText = "SELECT * FROM WebName WHERE WebGroupID = ? and UserID = ? ORDER BY WebNamID DESC"
    WebsiteName_cmd.Prepared = true
    WebsiteName_cmd.Parameters.Append WebsiteName_cmd.CreateParameter("param1", 5, 1, -1, WebsiteName__MMColParam1) ' adDouble
    WebsiteName_cmd.Parameters.Append WebsiteName_cmd.CreateParameter("param2", 5, 1, -1, WebsiteName__MMColParam) ' adDouble
    Set WebsiteName = WebsiteName_cmd.Execute
    WebsiteName_numRows = 0
    %>
    Thank  you

Maybe you are looking for