Re: Forms 6.0 - problem commiting form

From: Jeff <jeff_at_work.com>
Date: Fri, 21 Mar 2003 14:34:33 GMT
Message-ID: <b5f7tp$pfi$1_at_cronkite.cc.uga.edu>


Commit_form (or commit, which is also a built-in in forms) commits the ENTIRE form, including all database blocks that've been changed. You cannot simply go_block and commit only that block.

Therefore, you need to NOT insert data into (or change data) in the first block. You can use the first block as a query block (turn off inserts, updates, and deletes on the block) and use enter-query mode in that block. (This would probably be the method I would choose in this case.)

Alternatively, you could make that first block not be a database block (make it essentially another control block) and use the data inserted there for manual queries to use against your subject table(s). Control blocks are not necessarily for display items/buttons only.

In article <803c549a.0303210614.3ab6307b_at_posting.google.com>, vsimmons_at_hes.hmc.psu.edu (Vanessa) wrote:
>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
Received on Fri Mar 21 2003 - 15:34:33 CET

Original text of this message