Re: Forms 4.5 Problem (Record Locking)

From: <pol15_at_my-deja.com>
Date: Tue, 18 Apr 2000 16:05:11 GMT
Message-ID: <8di12i$rl9$1_at_nnrp1.deja.com>


Sybrand,

Thanks for your comment.

I'm not quite sure why you think that executing a COMMIT from a Form is "non-standard behavior". This is very standard behaviour.

For example, when you create a "base table" form using the wizard within Forms Designer, and opt for the "button palette" to be created, a "save" button is generated which uses the built-in procedure "COMMIT_FORM"; The COMMIT_FORM built-in issues a commit to the database for all changes made in the form since the last COMMIT_FORM was excecuted. Much in the same way that the standard COMMIT works.

Anyway, I tried what you suggested and create a brand new form with just one "base table" block created using only the wizard.

I then ran 2 instances of the Form .....

From INSTANCE 1:
I queried the base table block and updated one of the records WITHOUT hitting the "save" button (ie. without posting a COMMIT to the database).

I instead chose to "requery" the block at which point i was presented with the default Oracle dialog appears saying ...

"Do you wish to save the changes you have made?"

I answered NO, and the block then cleared and re-queried as expected.

From INSTANCE 2:
I queried the base table block and located the record that had been changed in INSTANCE 1.

I then attempted to update the record, and was presented with the message .....

"Could not reserve record - Keep Trying?"

In other words it's exactly the same problem as I first mentioned.

Try this yourself, you'll see what I mean.

Incidentally, if I then go back to INSTANCE 1 and issue a COMMIT (ie. hit the SAVE button), I get the message "FRM-40401: No changes to save" (as you would expect). The thing is, it also releases the lock as I can then update the offending record from INSTANCE 2 no problem.

This is what I would have expected to happen after replying "NO" to the default "save changes" dialog.

Definitely sounds like a bug to me.

I'd be interested to hear your comments on the above Sybrand,

Regards,

Pol.

In article <956068382.263.0.pluto.d4ee154e_at_news.demon.nl>,   "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
> Apparently you are executing a commit in your code.
> This is non-standard behavior.
> Try reproducing this behavior on a newly generated form without code
and
> you'll see it won't happen. If this truly was a bug, it would have
been
> ironed out long ago.
>
> Hth,
>
> Sybrand Bakker, Oracle DBA
>
> <pol15_at_my-deja.com> schreef in berichtnieuws 8dh754$v49
$1_at_nnrp1.deja.com...
> > Hi all,
> >
> > I have encountered a problem in Oracle Forms 4.5 with regard to
record
> > locking.
> >
> > If I update a record using a Form developed in Forms 4.5, and I
move on
> > to another record without choosing the "Save" option (ie. post a
commit
> > to the database), then a
> > default Oracle dialog appears saying ...
> >
> > "Do you wish to save the changes you have made?"
> >
> > If I answer "No" to this dialog box, then the record that was
changed
> > is not released for other users to update. It is still locked, as
if a
> > "rollback" has not beed executed. The reason I know the record
remains
> > locked is that, when I use the same Form in another session, a
"Could
> > not reserve record" dialog appears.
> >
> > The only way to release the record is to hit the "Save" button (ie.
> > post a commit to the database) or for the user to quit the Form.
> >
> > Is this a bug?
> >
> > Surely the record should be released if the answer is "No" to the
above
> > dialog box.
> >
> > Does anyone know a way round this problem.
> >
> > Any help greatly appreciated.
> >
> > Pol
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Apr 18 2000 - 18:05:11 CEST

Original text of this message