Oracle Forms 6i <-> mySQL (Commit Problem)
Date: 6 Dec 2002 01:12:09 -0800
Message-ID: <d9ac0951.0212060112.4415d1c8_at_posting.google.com>
Hi,
i'm using Oracle Forms Builder 6i to connect to mySQL 3.23.49 via Oracle Open Client Adapter for ODBC 6.0.5.35.0
Now I have a problem of controlling which form to commit if more than
one form are opened.
E.g. I need to open 2 forms (eg. A, B) and only want to commit the
changes made on Form A
1.
I open the forms using the follows (i can't use OPEN_FORM('A',
SESSION); since mySQL doesn't
support)
OPEN_FORM('A');
OPEN_FORM('B');
2.
then I changed both forms
Now the :SYSTEM.FORM_STATUS, :SYSTEM.RECORD_STATUS,
:SYSTEM.BLOCK_STATUS
are 'CHANGED'
3.
I then press my custom save button on form A (triggers KEY-COMMIT).
Inside KEY-COMMIT, it calls COMMIT_FORM, then triggers ON-COMMIT
eventually. In ON-COMMIT, i use the built-in COMMIT to commit the
changes.
Then I found that :SYSTEM.FORM_STATUS, :SYSTEM.RECORD_STATUS,
:SYSTEM.BLOCK_STATUS are 'QUERY' which is normal. However both forms
are committed.
4.
So I fixed it by: In ON-COMMIT, add RAISE FORM_TRIGGER_FAILURE; after
COMMIT Although it stops committing changes on another form. But
:SYSTEM.FORM_STATUS, :SYSTEM.RECORD_STATUS, :SYSTEM.BLOCK_STATUS are
still 'CHANGED' Then I do a EXECUTE_QUERY after COMMIT_FORM to change
back :SYSTEM.FORM_STATUS, etc to 'QUERY'
5.
It works. Only Form A is committed. However when Form A has a lot of
records (eg. >500), it affects performance.
Does anyone know how to solve this problem? Any help would be greatly appreciated
Peter Received on Fri Dec 06 2002 - 10:12:09 CET