DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: master detail update in form

  1. #1
    Join Date
    Sep 2000
    Posts
    7

    Question

    I have a 5.0 form that is composed of 2 blocks that each point to
    a database table. It is your basic master-detail relationship.
    I have encountered problems where users are entering
    data on the detail table from other forms. This has caused
    problems with updates in the master-detail form. I know this
    is because the detail row is locked when an update is attempted
    on the detail portion of the form. But forms doesn't seem to
    correctly handle the answer to the "locked record" popup.
    Should I include the FOR UPDATE clause on my detail blocks
    where clause to prevent this? What event does the locked record
    popup, invoke (not an exception or SQL%NOTFOUND I think)?
    Any ideas?

    Thanks, Tim

  2. #2
    Join Date
    Aug 2000
    Posts
    53
    Hi Tim.

    Can you explain detail, because i am not getting what is your problem. Like you dont want to see the records which is enter through form.

    Thanks
    ABC

  3. #3
    Join Date
    Oct 2000
    Posts
    9

    Thumbs up

    LOCK_RECORD built-in

    Description

    Attempts to lock the row in the database that corresponds to the current record. LOCK_RECORD locks the record immediately, regardless of whether the Locking Mode block property is set to Immediate (the default) or Delayed.
    When executed from within an On-Lock trigger, LOCK_RECORD initiates default database locking. The following example illustrates this technique.

    Syntax

    PROCEDURE LOCK_RECORD;
    Built-in Type unrestricted procedure
    Enter Query Mode no

    Parameters

    none

    This excerpt is from Oracle Forms 5.0 documentation set.



  4. #4
    Join Date
    Sep 2000
    Posts
    7

    LOCK_RECORD Failure


    ok, to clarify. How do I tell if the LOCK_RECORD failed to
    lock the record.

  5. #5
    Join Date
    Oct 2000
    Posts
    9
    You will receive Oracle Message "Cannot reserve record..."

    Receiving this message is contigent upon you having the row you are trying to modify locked in another form(uncommitted changes ) or db process where records have been modified but no commit has occured.

    You could go a step further to trap this message in a form level on-error trigger and display a nice alert message of your own.


    Cheers, hope this helps.

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