Re: Forms 6.0 - problem commiting form

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Fri, 21 Mar 2003 17:05:33 GMT
Message-ID: <MPG.18e4e635cf2c700b989709_at_news.la.sbcglobal.net>


vsimmons_at_hes.hmc.psu.edu said...
> I have a form with three data blocks:
> 1) Database block with subject information
> 2) Database block with form information
> 3) Control block containing display items and buttons.
>
> The first data block has a field called subj_seq as does the second
> data block. At first, I did not set up these two blocks as
> master-detail, but since the form wasn't working I tried to do this
> hoping that it would fix my problem. It didn't.
>
> The purpose of the first data block is to have the user input values
> into these fields which will then give me the subj_seq which will get
> inserted into the second data block. So, although the first data
> block is based on a table, I do not want any data to get inserted into
> this table - it's only there to make sure that only valid data gets
> inserted into the second table.
>
> I have a button in the control block that is used to save the data.
> Right now I have it doing a go_block('second block') and then commit;
> I've also tried a form_commit; but that doesn't seem to fix the
> problem either. The form is trying to commit the first data block and
> coming back with an error because that subject has already been
> entered in the database. How do I get my form to only insert the data
> that I've entered in the second data block?
>
> Thanks for any help!
> Vanessa
>
Don't know if it works in Forms, but in a stored procedure, I'd use an "autonomous transaction" to control what gets committed. You can do a Google search for the PL/SQL construct "pragma autonomous_transaction" for some examples.

-- 
/Karsten
DBA > retired > DBA
Received on Fri Mar 21 2003 - 18:05:33 CET

Original text of this message