-
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
-
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
-
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.
-
LOCK_RECORD Failure
ok, to clarify. How do I tell if the LOCK_RECORD failed to
lock the record.
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|