Master detail DML

Hi,
I am using ADF and JSF .
I have a master detail screen and in the header part, it shows 10 records at a time. In the detail part, there is an insert button for users to create new records. Clicking the insert button goes to a new page. After entering the required input vaues and clicking the save button, it will go back to the orginal page.
My problem is : for example, when a user is in the page 4 of the header part. For a speicifc header record, he presses the insert button to create a detail record. But after clicking the save button, it goes back to the orginal page but the header part is in the page 1.
What can I do so that after creating a record, the header part is still in page 4 ?
Many thanks in advance.

Marc,
ok, I won't use APP_SESSION as well then.
I have managed to get the first 2 pages (Master & Detail Report) running but now I can't edit the Detail Table items with the following Oracle Error (with debug output):
0.04: Computation point: AFTER_HEADER
0.04: Processing point: AFTER_HEADER
0.04: ...DML_FETCH_ROW (AFTER_HEADER) F|#OWNER#:ORBIS_CLASSIFICATION:P3_CLASSIFICATION_ID:CLASSIFICATION_ID
0.05: Show ERROR page...
0.06: Processing point: AFTER_ERROR_HEADER
Error Unable to fetch row.
OK
0.06: Processing point: BEFORE_ERROR_FOOTER
ORA-01722: Ungültige Zahl (Invalid number)
0.07: ...Determine if user ADMIN with SGID 818101361667739 can develop application 112 in workspace 818101361667739
What does that mean?
Thanx,
Gerhard

Similar Messages

  • NO dml Master / detail form/report

    If I wanted to create a form or report that would only display one master record and its children records on one page. What would be the best way to do this?
    The page would not support dml. Only display the data in a master/detail fashion. I tried creating a form thru the wizard but I dont need dml.
    I tried creating a report but all the data is horizental and would prefer more of a form type of layout.
    A simple illustration follows below. Above the line is the data from the master table. Below the line are the childern.
    Columa pk
    Columb columc columnd
    column pk columndesc columna fk
    column pk columndesc columna fk

    Me too facing the some problem can some one pls help

  • Can I link from Interactive report Page 1 to Master Detail page 2?

    Hi folks-
    I know how to create a Page as an Interactive Report; it creates 2 pages automatically (primary page with the great interactive bar) and a 2nd page that's a single record.
    I know how to create a Page as Master Detail, whereby I get a tabular list without the super interactive bar, and I can select a record, and get transported to a nice page with 2 regions (master on top, detail on bottom).
    I want to have the First page from the Interactive Report, select the record, and go to the 2nd page of a MasterDetail.
    Do I create the Interactive Report, and customize the 2nd page, to add a region?
    Or, do I create both page types, and redirect from the 1st page of the Interactive Report to the DML Form from the MD report? I tried that, re-assigning the link from the Interactive Report to be a Link to Custom Target, and specify the page # of the Master-Detail page. And it is taking me to the right page, but the data from the selected row is not coming with me, and the detail in the bottom region is not appearing at all.
    Can someone please give me a nudge as to the sequence I should be doing?
    (As you can tell, I'm new to Apex.... I'm trying to use it to create a prototype or proof-of-concept for a database driven web application)
    Thank you
    Marion

    Yes, I tried that after I wrote to you - and it's fine, but not what I'm after; it's only based on 1 table and I'm working with 2 tables.
    Perhaps I can explain in better.
    I want one page as an interactive tabular report (of the master records)
    I want to select a row, and transfer to a page that has the corresponding row on top (as a form), and a tabular region below of records from a related detail table.
    ie, I want page 1 from the Interactive Report, and page 2 of the Master Detail report.
    OK - I just took the form page, and added a region below in a tabular report. And I'm getting the data, but I'm getting all the records (not just the ones associated with the single record on top. I figure I need to edit the Region Definition->Source (to specify that the id numbers need to match), but the code is not editable.....
    So I am in Structured Query Attributes, and I've Modified the Join Conditions - but I still get all the detail records in the bottom region. I''m trying to add in the ( + ) qualifier, but it doesn't affect anything...
    I'm soo close to what i'm trying to do!
    Thank you for your continued patience and assistance
    Marion
    here's the Source I have for the region..... (I'm including the excess ID columns just for learning purposes)
    SELECT
    "PHONENUMBERS"."PHONE_ENTITY_ID" "PHONE_ENTITY_ID",
    "ENTITIES"."ENTITY_ID" "ENTITY_ID",
    "ENTITIES"."FIRSTNAME" "FIRSTNAME",
    "ENTITIES"."LASTNAME" "LASTNAME",
    "ENTITIES"."COMPANY" "COMPANY",
    "PHONENUMBERS"."PHONE_ID" "PHONE_ID",
    "PHONENUMBERS"."PHONETYPE" "PHONETYPE",
    "PHONENUMBERS"."PHONENUMBER" "PHONENUMBER",
    "PHONENUMBERS"."PHONECOMMENT" "PHONECOMMENT"
    FROM
    "PHONENUMBERS",
    "ENTITIES"
    WHERE ENTITIES.ENTITY_ID = PHONENUMBERS.PHONE_ENTITY_ID
    Edited by: mtpaper on Oct 12, 2009 1:30 PM
    Edited by: mtpaper on Oct 12, 2009 1:32 PM

  • Creating master detail rows

    using adf/bc with jsf. I have defined a master detail relationship between two entities. This relationship is a composition relationship. The entities are related by a view link which link the master and detail view objects. i have a need to create/insert a master row and a detail row programmatically "on the fly" so that when the jsp renders, the user will see blank inputs for both the master and detail view objects. The problem is that the primary key of the master record is not known at creation time ( it will be entered by the user) and therefore the detail record cannot be created by the framework because of the unknown value of the parent's primary key. I was hoping the following section in the adf guide would eliminate my problem, but it doesn't appear to:
    This is from section 26.7.3.2 of the adf developer's guide
    Note: An alternative to the programmatic technique discussed
    above, which solves the problem at the J2EE application layer, is the
    use of deferrable constraints at the database layer. If you have control
    over your database schema, consider defining (or altering) your
    foreign key constraints to be DEFERRABLE INITIALLY DEFERRED.
    This causes the database to defer checking the constraint until
    transaction commit time. This allows the application to perform DML
    operations in any order provided that by COMMIT time all appropriate
    related rows have been saved and would alleviate the parent/child
    ordering described above. However, you would still need to write the
    code described in the following sections to cascade-update the foreign
    key values if the parent’s primary key is assigned from a sequence.
    This approach did not help in allowing me to create the detail record without first knowing the value of the parent's primary key record in a composition relationship. The only thing i've found to work is define the relationship as just an association, and not a composition. However, this is a true one to many (composition) relationship and i would like to take advantage of some of the features of the framework that are there when a relationship is defined as a composition relationship. Is there any way to do what i need to do with a composition relationship defined between these two entities? Thanks.

    Hi,
    I guess you need a "Cascading LOVs".
    1) Create viewObject for country values list. Named VO1.
    2) Create viewObject for state values list. Named VO2.
    3) Create view criteria for (bind variable) VO2 which can restrict the result by country.
    4) Create view accessor to get VO1.
    5) Create view accessor to get VO2. Define the bind variable value which can provide country info dynamically. I guess it should be a Groovy expression.
    6) Create country LOV on step 4) view accessor.
    7) Create state LOV on step 5) view accessor.
    Done
    On the view layer, you may enable PPR between country and state attributes.
    Todd

  • Is this a bug? master rowid value lost when saving on a master/detail form

    master/detail forms seem to lose the rowid after saving, if the unique identifier is set to ROWID
    to reproduce the problem:
    1) create a master detail form on DEPT/EMP
    -- choose 'Managed by Database (ROWID)' on the 'Define Primary Key' page.
    -- do not include master row navigation (but i don't think this matters)
    -- choose 'Edit detail as tabular form on same page' on the 'Choose Layout' page
    -- include the master report
    2) on the master/detail page, change the conditional branch that returns to the master report page
    -- the normal condition for this branch is request in SAVE,DELETE,CREATE
    -- change it to request in DELETE,CREATE
    3) run the form and save a change
    -- saves fine, session shows the ROWID value is still set
    4) save a second change
    -- change does not save, form reverts to Create mode
    this problem does not occur when using the primary key columns instead of rowid
    see http://apex.oracle.com/pls/apex/f?p=60813:7 for the ROWID version
    see http://apex.oracle.com/pls/apex/f?p=60813:11 for the PK column version

    Hi Saverio,
    Bug *13563808* has been logged to track the reported issue, and a fix will be made available in a future release. Just to clarify, this issue is only arising when the APEX-generated Master-Detail is modified post-generation, so for users who have not modified their Master-Details using ROWID to manage their DML processes, they should not experience this issue.
    In relation to my workaround, my suggestion works in my test environment, which I verified before posting the initial suggestion. Please note that the 'Reset Page' process is, by default, conditional on the "Delete" button being pressed. If you have made further modifications to your Master-Detail page, then this might explain why you're seeing different behaviour to me. You might using the "Debug" option on the Developer Toolbar useful. Viewing the debug information should help you to decipher what's going on/wrong on your page. If you still can't resolve the issue, then the safest option might be to revert the page back to it's original state, meaning the user navigates back to the Report page upon submitting changes to the Master-Detail Form page.
    Regards,
    Hilary

  • Apex - Error in Checksum in Master-Detail Form Page

    The following error message is thrown in a Page with a Master-Detail Form in Apex ,
    ORA-20505: Error in DML: p_rowid=362, p_alt_rowid=ID, p_rowid2=, p_alt_rowid2=. ORA-20503: Current version of data in database has changed since user initiated update process. current checksum = "71064C738DA3DADD5500149404378CFF" application checksum = "0"
         Error     Unable to process row of table "table-name".
    Somebody can tell me what is happening ? Thanks.

    Please check this thread ORA-20505: Error in DML : ORA-20503: . There is a detailed discussion on the same error.

  • Master Detail Relationship and Posting changes!

    I have a "MAster" medical-procedure block, and an "Detail" items block. The items block, being the detail block, in the master detail relationship shows the items used during the medical procedure. Both the master and detaqil blocks are based on stored procedures.
    Problem: I have multiple medical procedures (multi record master) and many items associated with the procedure (multi record detail). If I ask the user to "SAVE" the changes, after every detail entry ( for the correspondin master), it becomes a "PAIN" for the user. He wants to be able to choose a procedure, choose the details(items) associated with that procedure, and move on to the next master record, (the next medical procedure) , select it, if he performed that procedure, choose its corresponding detail items, "WITHOUT SAVING IN BETWEEN" navigation between the master records / "MEDICAL PROCEDURES"!
    1. Is it better to go for a master-detail relationship? If so, how do I prevent the "Please save the changes" when navigating between master records and ALSO save the details, without doing the "SAVE" multiple times. Can I go for a post ?..If so where? When-new_record instance/ any "Form level trigger"?
    2. If I do the go_block('dtl blk name'); execute_query; thing to coordinate between blocks, and "post" changes in the when -new -record-instance of master, the detail complains of a null value when I move from a medical procedure to another medical procedure which is not actually performed.
    I hope I make sense, any suggestions , "Welcome"!
    Thanks!

    Hi,
    I'd suggest to check this tutorial:
    http://www.oracle.com/technology/obe/obe_as_10g/bi/forms/formsmasterdetailobe.htm
    Having a relationship between data blocks, coordinates dml actions in both, so no coding is needed to save/update/delete records, forms built-ins do the work.
    hope this is useful,
    Hugo

  • Master detail form initial insert issue on details sub-region

    Hello,
    I created a master detail form with report which should do insertion on master and detail region/subregion.
    On insert mode I enter with data master and detail block, when I press "Create" button, insertion happens only on master block (order table) not and on detail block (order_item table).
    On EDIT mode it does insertions/updates on master and detail block without problems.
    Application Express 4.2.1.00.08
    Oracle Database 11g Express Edition Release 11.2.0.2.0
    I appreciate your help.
    Regards

    Something like this should do the work:
    CREATE OR REPLACE TRIGGER order_item_table_tr
       BEFORE INSERT
       ON order_item_table
       FOR EACH ROW
    BEGIN
       IF :NEW.order_id IS NULL
       THEN
          :NEW.order_id := v ('P1_ORDER_ID');
       END IF;
    END order_item_table_tr;
    /Make sure the Automatic Row Processing (DML) of the order table returns key into item > Return Key Into Item > P1_ORDER_ID (or however the primary key of the order table is named)
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Need Master-Detail relation to link Master column to 2 different detail col

    I have a form with a master detail relation. The master block is a database table rec_shipments with a primary key of shipment_id and a bunch of other columns. The detail block is a table rec_containers with a container_id as the primary key plus column shipment_id, split_shipment_id, weight, volume, etc. The shipment_id and split_shipment_id are nullable.
    When a shipment is received a shipment record is created and container records are created with the shipment_id populated and the split_shipment_id null. In the form a relation was created between the shipment block and the container block as shipment_id=shipment_id. This works fine. However, they have the ability to spit the original containers into smaller more manageable containers for distribution. For example if they receive a railroad car full of pallets of printer paper they may take and divide them, half into 1 rolloff bin and half into another rolloff bin. The rolloff bins will get a unique container_id for tracking. The record in the system created in the rec_containers table will have the split_shipment_id populated and the shipment_id null. In the screen they want to see the original containers (railroad car) and the split containers (rolloff bins) when the query the shipment.
    What they want:
    Shipment_id -- and additional information
    Railroad Car ID plus additional information
    Rolloff Bin 1 ID plus additional information
    Rolloff Bin 2 ID plus additional information
    My problem is the rolloff bins don't show up with the current relation because the shipment_id is null in the 2 rolloff bin records.
    I've tried creating a view on the rec_containers table that is all the columns in the table plus 1 additional column that is
    nvl(shipment_id,split_shipment_id) comp_ship_id
    and set the relation to shipment_id=comp_shipment_id. I set the comp_shipment_id column to query yes and insert & update to no because I don't want to update that column in the view.
    The problem is I can't update any columns, I get a can't reserve record for update or delete error.
    Does anyone have any ideas how I can get the containers block to query all records where the shipment_id or split_shipment_id matches the shipment block shipment_id and still be able to update the records?
    Thanks for any help.

    Your idea of using a view is the best approach. In order to make the block updateable, you have to sst the property "Query only" for your derived item to "Yes". Witn this, the column will not be included in any further dml. About the locking... it may be that forms isn't anymore able to do proper locking when a block is based on a view. In that case, put an ON-LOCK-trigger on the block and lock the record by yourself doing y SELECT FOR UPDATE NOWAIT on the record. To just try if this would work you use a NULL in the ON-LOCK just to xheck if the dml-operations itself will work. if your view is based on only one table you have good chances that there is nothing to change, if you get an error like "View not updateable", you have to do some further adjustments
    -Set the key-Mode for the block to "Non-updateable"
    -Set the property "Primary key" to "Yes" for the pk-item in your block.
    hope this helps

  • Problem in implementing Master-Detail-Detail design in Forms 6i

    Hi, all technocrats!!
    Here i've problem in Master-Detail-Detail sort of design in
    Forms 6i..
    This thing i've implemented earlier in one form...and that is
    fine...and i could not track the root when i've got a problem in
    a new form...which of the same manner...
    The problem is that...
    When i enter data into the 1st detail block and navigate to the
    2nd detail which is a detail block to the 1st detail...and enter
    data, there is no problem, but when i navigate back to the 1st
    detail block and that to a new record in the 1st detail...form
    is showing indefinite behaviour( Hanging )...
    But when i navigate back to the same record in the 1st detail
    from the 2nd detail...there were no problems and it is working
    fine...
    And whenever i shift to a new record in the first detail it is
    asking to save that record...to solve this problem., i've used
    POST in the new block instance of the 1st detail...and i'm
    comfortably managing it...if i dont use this POST method...it is
    clearing the details in the 1st detail itself when i traverse
    back to it from 2nd detail after inserting records...
    But this hanging problem is really driving me to Hang myself...
    Plz do suggest me to get rid of this problem...

    Developing proper transactional behavior with Oracle Forms
    in Grandparent-Parent-Child case is a problem.
    We must use some 'container' for 'non-visible' Child records
    (Child records with Parent different from current record in
    Parent block).
    I try to solve this problem in 2 different ways:
    1. Using POST built-in. In this case 'container' is Child
    database table. But, problem can be because POST built-in
    actually executes DML statements (this locks records and fires
    database triggers - so a deadlock can occur) before COMMIT_FORM.
    2. Using a 'temporary container'. 'Temporary container' can be
    (for example) temporary database table, PL/SQL table of records
    (defined in Forms package or database package), Forms record
    group. This variant has not problem with record locks/database
    triggers, but is much more complex for programming than 1.
    variant.
    In my development, when I haven't problem with record locks or
    database triggers, then I use POST. In other cases, I use 2.
    variant, with PL/SQL table of records (defined in Forms package)
    as 'temporary container'.
    Further, when we use POST, we can do this in more ways.
    One method is to use POST in Forms level WHEN-NEW-RECORD-
    INSTANCE trigger.
    Different method is to change code in CLEAR_ALL_MASTER_DETAILS.
    Instead of:
    CLEAR_BLOCK (ASK_COMMIT);
    we can write:
    IF mastblk = "name_of_master_block" THEN
    CLEAR_BLOCK (ASK_COMMIT);
    ELSE
    POST;
    END IF;
    Which method you use?
    Regards
    Zlatko Sirotic

  • Master-Detail relationship and querying back from the detail block

    Hello friends,
    Using oracle forms 6i. I have a multi data block. On the block there is a header and detail section. There is master detail relationship present in these blocks. I have a sequence defined, which generates an auto-number.
    Now in the detail section say I have 4 records all of which are say invoices and I am populating the details about it. On the 'save' button I have defined a logic which generates an auto- number or a unique number for all the 4 records in the detail section. The unique number is shown in the header section in a text-field.
    Now when I query (F11 and then Ctrl+F11) with the help of the unique number i see all the 4 records under it in the detail section. But when I query with the help of one of the 4 records in the detail section it says "fetching more than a single row." I know the same unique number is there for all the 4 records and in the header section I am displaying "number of items displayed" to be 1. That is why the error. But I want that to remain one. How exactly can I develop this functionality of querying the unique number in the header section from the detail block?
    Please help as soon as possible.

    Hi,
    I'd suggest to check this tutorial:
    http://www.oracle.com/technology/obe/obe_as_10g/bi/forms/formsmasterdetailobe.htm
    Having a relationship between data blocks, coordinates dml actions in both, so no coding is needed to save/update/delete records, forms built-ins do the work.
    hope this is useful,
    Hugo

  • Wizard generated Master-Detail form issues

    The wizard-generated master/detail forms have several severe usability issues when the "Choose Layout" option is set to "Builder master detail with: edit detail as tabular form on same page".
    Some of these issues are:
    - The form has two Apply Changes buttons, one to save the master row and one to save the detail row. Users find this very confusing. If you save the master row changes, any changes to the detail rows are lost and vice versa.
    - The form has two Delete buttons, one to delete the master row and one to delete the checked detail rows. Users find this confusins also. Clicking the lower delete button discards any other changes that were made.
    - The Add Row button also discards any other changes that were made.
    The first two issues are easily fixed. With a few simple changes to the generated page, I can make it so there is a single "Apply Changes" button that 1) saves any changes to the master row, 2) saves any changes to detail rows and 3) deletes any checked detail rows.
    I cannot figure out how to solve the third issue (that the add row button discards any changes). I can make it so the "Add Row" button saves the changes, but this isn't user friendly either; I don't think any changes should be comitted unless the user specifically presses 'Apply Changes'.
    So far, I thought of several ways to possibly fix this but can't get any of them to work. Some of the ideas were:
    1. The 'Add Row' button could run the automatic row processing and MRU processes, but not do a commit untill/unless Apply Changes is pressed. I don't think this is feasible because http is stateless and connection pooling may be used, so we can't have a transaction that spans http requests.
    2. Move the Add Row process to page rendering so that the detail table always has an empty "add row" row thereby making the Add Row button unnecessary. I tried this, but it looks like the add row process was designed to run during the page processing, not during rendering, and it fails with a divide by 0 error when it is run during page rendering.
    3. Use client-side DHTML (instead of the HTML DB add row process) to add an empty row to the html table (i.e. add row button does not do a submit, it is handled entirely on the client). I tried this, but the MRU process fails because it doesn't expect the added row.
    If anyone has any other ideas on how to fix this problem, they would be greatly appreciated.
    HTML DB solves this problem in the SQL workshop create table wizard.
    In HTML DB 1.6, the "Add Column" button does a submit but somehow saves any changes that were entered.
    In HTML DB 2.0 beta, client-side DHTML is used (my approach 3 above).
    Can someone from Oracle share how the HTML DB create table wizard solves this problem?

    Eric,
    Thanks for your feedback. I’ll add your suggestions to our list of tabular form enhancement request.
    The wizard generates a regular form for the master record and a tabular form for the detail records. As you pointed out, it’s quite easy to customize this to your individual needs.
    Unlike regular forms, there’s currently no session state concept for tabular forms, so you either need to write your data to the database, or you will loose any changes if you e.g. paginate. For the same reason, the “Add Row” button and the associated process is generated so that any changes are saved to the database before adding a new row. Of course the MRU process that is executed on “Add Row” can be removed, if that is the preferred behavior.
    A work around would be to code the DML processes for tabular forms manually, and temporary store the data in HTML DB collections to simulate a stateful behavior.
    In HTML DB 2.0 we started adding DHTML features, such as the create table wizard you’re referring to. Some features, like the pull down menus, will be available to be used in your own applications. Other features, like the DHTML tabular form, won’t be available for custom applications in 2.0.
    Regards,
    Marc

  • Master - Detail relation succeded and the failed!!

    Hi all,
    I've made a master-detail relation between two data block using data block wizard with (copy value from item) property, this worked successfully for times and failed a lot of times!
    when I insert a record at the master data block the value is copied at the detail data block, but when I did the same thing for another time the value didn't copy!!
    to solve this problem I made a trigger at the detail data block (pre insert):
    :Master.Item-Value := :Detail.Item-Value
    this one succeded for the first time and then it failed!!
    I don't know what is the problem
    Note:
    I connected to a database server on another PC and work and save my forms at this PC.
    Edited by: Dev. Musbah on Oct 5, 2008 3:54 AM

    One about the important note:
    Thats exactly the missing point.
    If you assign the PK-value by a database-trigger, you have to read it back into forms after the insert.
    Three possibilities:
    1. There is a property at block level like "DML returning clause" If set to "Yes", forms will read back all values from the db after insert or update.
    2. Write an POST-INSERT-trigger at block-level and read back the ID by yourself using a cursor.
    3. Assign the PK-value already in the form in a PRE-INSERT-trigger and populate the PK-column in the database-trigger only if the pk-column is null
    hope this helps.

  • 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.

  • Questions on Master-Detail HTMLDB HOW-TO

    Hi all
    I have created a 3 page application based on the master detail how-to given at http://www.oracle.com/technology/products/database/htmldb/howtos/index.html
    Instead of DEPT and EMP tables I have PERSON and PERSON_ADDR tables. The PK of PERSON is the person_id and the PK of PERSON_ADDR is the person_id and addr_start_dt. Person_id column in PERSON_ADDR is obviously the FK to the master table PERSON(person_id).
    At first I had problems trying to create the pages themselves because the wizard always hides the person_id column on all the forms(and I don't want that,even though it is a sequence number I still want people to see it) , it being the PK, then somehow I managed it to display the person_id by replacing the EDIT link with the person_id itself. Now if a person already has an address and I click on EDIT then it copies the person_id values and others to the next page and all looks good but when I try to create a new address it does it ?? (It should take across the person_id as well)
    My PERSON report is on page 1, when I click edit against a person it takes me to page 2 where I can see+change all the person details plus I can see the person_addr details. When I click edit against a person address it takes me to page 3 and I can edit all the address details nicely copied to the new page but when I click CREATE on the page 2, then all the fields appear as NULL on page 3( all the fields but the person_id should be null here). How can I fix this ?
    Also, for my person address I would like to validate the address dates , there should be no overlapping start and end dates for a person's address. How to do this ? I think I will need to create a function to which I pass the person id and the new start and end dates and this function returns error message,if any, or null. I had a play around with validation and I think I need to use "function returning error text", what should I put in the "validate expression 1" box then...just something like
    begin
    my_function(param_1,param_2)
    end;
    If yes, then what variables would store the new start date and new end date of an address.
    Lastly, for every table do I have to user a sequence number or a trigger to define a primary key, what if the primary key is just a character code and I want the users to add it ?
    Thanks a lot in advance !!

    thanks Marc.
    Yes you are right, I used the 1.5 viewlet. I will try the master-detail wizard now.
    With the primary key problems, for things to work nicely in HTMLDB, do you suggest each and every tables should have a sequence number generated primary key ? We have some tables for various statuses like ACTIVE,CLOSED where these codes themselves are the primary keys, so you suggest making these codes unique keys but still have a sequence number PK ? Also when I want the users to enter the primary key themselves I will let them enter new ones but not update existing ones, so data entegrity is maintained.
    I was able to work out how to create validations using "functions returning error text" but my problem is I need to be able to compare what the user has just updated/entered with the data that already exists in the table. I have a table called person_Address having columns like person_id, start_dt,end_dt and various other fields. The primary key is person_id and start_dt and I need to put a validation which avoids any overlapping addresses. Overlap as in there can be only 1 active address for a given start and end date range. Does HTMLDB has something like :new.start_dt the way we can write database triggers ? Please suggest a way to do this.
    Lastly, how does HTMLDB handles error messages raised by table triggers. Can they be shown along with the item on the page as we can with the other HTMLDB validations ? I have many tables with all sorts of triggers and if any validation fails I generally do...raise_application_error(-20001,get_my_message(234));
    get_my_message function returns the message text for message number 234 . Will this message be displayed somewhere or not ? Do I have to duplicate my validations , once in the triggers and then in HTMLDB as well ?

Maybe you are looking for

  • Internal Error in reading a Table of Oracle custom-defined objects.

    Hi, We are running into an Oracle internal error when trying to extract data from an OUT parameter of a stored procedure. The OUT parameter is of the type TABLE of Oracle custom-defined OBJECT. Any help on this issue will be greatly appreciated. Than

  • Why will images will not automatically load in apple mail despite having the setting turned on correctly

    I have had this ongoing problem. I cannot get images to automatically load in mail. Instead I always have to click the load images button. I click on a message, click load images, the images load. I click on another message, then back to the message

  • Sender - JDBC - Connection issue

    Hi All, I see a very strange issue on the JDBC Sender Comm Channel. On the Comm Channel Monitoring, I see it in GREEN. But it is not actually polling the DB table. Restarted the channel and that did not work. For now I have created a copy of the comm

  • SAPJRA timeout

    Hello, I need to extract mass data out of SAP and I use the SAPJRA & JCO to do that. But after some time I get a "timeout" exception. Is there a possibility to set the timeout for the SAPJRA? thanks a lot, Juraj

  • Upgrade graphics on T43 with Intel Integrated adapter?

    Machine type is 1871-4AU.  Can I upgrade the graphics?  If not, is there anything like a list somewhere of the upgrades I can do?  I would also like to add a dvd burner.  I like the machine and have now dumped about a hunded bucks in memory and new k