Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Novice Form Builder -- ORA-40509 Oracle Error - Unable to Update Record

1,125 views
Skip to first unread message

Sonjia Amensen

unread,
Sep 23, 1999, 3:00:00 AM9/23/99
to
I would appreciate hearing from anyone who might know what my problem is. I
have a tabbed form; the data block contains a record that can have two
occurrences. I set up a radio button that 'toggles' between the two (one is
mandatory and already exists; the other is optional). The WHEN-RADIO-
CHANGED trigger will insert the optional record, toggle between both
records, and update the mandatory record. But when I try to save
(COMMIT_FORM) I get the FRM-40509 error. Any ideas?

-**** Posted from RemarQ, http://www.remarq.com/?b ****-
Real Discussions for Real People

kais...@my-deja.com

unread,
Sep 24, 1999, 3:00:00 AM9/24/99
to
In article <9lpG3.361$Eb.272269@WReNphoon3>,

Nors...@yahoo.com (Sonjia Amensen) wrote:
> I have a tabbed form; the data block contains a record that can have
two occurrences. I set up a radio button that 'toggles' between the
two (one is mandatory and already exists; the other is optional). The
WHEN-RADIO-CHANGED trigger will insert the optional record, toggle

between both records, and update the mandatory record. But when I try
to save (COMMIT_FORM) I get the FRM-40509 error.

typing frm-40509 into the help|search, I got:
FRM-40509: ORACLE error: unable to UPDATE record.

I've seen this when required table fields are not being updated.
So if a form control has it's database item property set to false,
and the item is required for the underlying table, you'll get this
error.

Overall, this would exhibit itself when
the block is a database block
an insert is attempted
record fields required for insert are not available
or,
an insert or update is attempted
the underlying data violates a constraint
(table: duplicate records, or index constraint violation)

To resolve:
insert message statements to see all fields being updated or
inserted;
Verify these fields have Database Item property set to YES;
Try to update the table with SQL-PLUS (or Access);
Isolate any problems found (note: Access will give you a
(decent -odbc- error message as to why the update failed)

code example:
MESSAGE('field1='||:BLOCK.FIELD1||' field2='||:BLOCK.FIELD2);

If you can update the record with SQLPLUS, then it's likely
a required field is not set to be a Database Item.
If you can't update the record with SQLPLUS, then you've likely
got a table or index violation (check table and index creation
scripts for constraints)

Good Luck, Rich


Sent via Deja.com http://www.deja.com/
Before you buy.

0 new messages