trigger ? for Forms 6i
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: trigger ? for Forms 6i

  1. #1
    Join Date
    Nov 2002
    Posts
    3

    Question trigger ? for Forms 6i

    Hello, I am using Forms 6i.

    What type of trigger and what syntax should I write if I need to automatically update foreign key field (loc_no for example) in the TEST table (for example) when the use make changes to the primary key (loc_no) in the Locations table

    Thanks a lot!

  2. #2
    Join Date
    May 2002
    Location
    USA
    Posts
    462
    based on the business needs u can choose the type of trigger
    if the form is complex , which calls aother forms or
    if the modified location is being used in next part of the form
    write it in key_next_item trigger or next_record trigger

    ideally i belive it should be written just before saving the record . once all validations are checked . when_button_pressed .

    1) insert a new record in the master table , with modified record location ( primary key column )
    commit ;
    2) update the child records to the new location .

    then drop the previous record for old location

    . this is not a good solution .
    if such a requirement is their , .
    handle all database constraints in the forms level
    remove it at database level best is put some other column as primary key . by doing this "commit" part could be removed in the middle of the transaction .
    siva prakash
    DBA

  3. #3
    Join Date
    May 2002
    Location
    USA
    Posts
    462
    commit may not be required in between .
    siva prakash
    DBA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width