Re: Novice Form Builder -- ORA-40509 Oracle Error - Unable to Update Record
Date: Fri, 24 Sep 1999 16:16:30 GMT
Message-ID: <7sg84g$9np$1_at_nnrp1.deja.com>
In article <9lpG3.361$Eb.272269_at_WReNphoon3>,
NorseTwin_at_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.
Received on Fri Sep 24 1999 - 18:16:30 CEST