| ORA-00600: internal error code, while compiling oracle forms 6i. [message #411429] |
Fri, 03 July 2009 09:25  |
sudhir_83k Messages: 9 Registered: September 2007 |
Junior Member |
|
|
hi,
to insert primary key id sequence value,i have written the below code in block level pre-insert trigger.
DECLARE
v_alert_button NUMBER;
CURSOR c_cargo_tab IS
SELECT cargo_tab_seq.NEXTVAL
FROM dual;
BEGIN
OPEN c_cargo_tab;
FETCH c_cargo_tab INTO :CARGO_TAB.id;
CLOSE c_cargo_tab;
IF :CARGO_TAB.id IS NULL THEN
Message('Error Generating Next cargo id');
RAISE Form_Trigger_Failure;
END IF;
:CARGO_TAB.cr_by := :GLOBAL.g_login_name;
:CARGO_TAB.cr_dt := SYSDATE;
:CARGO_TAB.upd_by := :GLOBAL.g_login_name;
:CARGO_TAB.upd_dt := SYSDATE;
EXCEPTION
WHEN form_trigger_failure THEN
RAISE form_trigger_failure;
WHEN OTHERS THEN
--v_alert_button := msgbox ('ERROR in Pre-Insert - ' || SQLERRM, 'STOP', 'Contact IST');
Message('Error Generating Next cargo id1');
RAISE form_trigger_failure;
END;
but when i compile the triger it is giving
Compiling PRE-INSERT trigger on CARGO_TAB data block...
Compilation error on PRE-INSERT trigger on CARGO_TAB data block:
PL/SQL ERROR 0 at line 0, column 0
ORA-00600: internal error code, arguments: 17069, 133752976], [, ], [, ], [, []
Please advice . or is there any other method to insert primary key sequence value into the table from forms.
Thanks
Sudhir.
|
|
|
| Re: ORA-00600: internal error code, while compiling oracle forms 6i. [message #411430 is a reply to message #411429] |
Fri, 03 July 2009 09:31   |
cookiemonster Messages: 1340 Registered: September 2008 Location: Rainy Manchester |
Senior Member |
|
|
1) Can you please use code tags when posting code - see the orafaq forum guide if you don't know how.
2) The best thing to do on getting an ORA-0600 is go to metalink and if necessary raise an SR with oracle support.
3) I don't know if it's got anything to do with your problem but this bit of code:
IF :CARGO_TAB.id IS NULL THEN
Message('Error Generating Next cargo id');
RAISE Form_Trigger_Failure;
END IF;
is completely pointless.
The only way that cursor is not going to populate that variable is if you get an oracle error, in which case that if won't run.
|
|
|
|
|
| Re: ORA-00600: internal error code, while compiling oracle forms 6i. [message #411528 is a reply to message #411433] |
Sat, 04 July 2009 13:58  |
Littlefoot Messages: 9166 Registered: June 2005 Location: Croatia, Europe |
Senior Member |
|
|
Gee, what made you write such a code? Declaring a CURSOR which selects NEXTVAL from a sequence; opening, fetching and closing the cursor; inserting value into an item and checking whether it is null (how could it be, if the sequence exists?). Useless exception handler. Far too complicated! (And it wouldn't surprise me much if - it was written simpler - ORA-00600 wouldn't appear at all).
Basically, this is all you need::CARGO_TAB.cr_by := :GLOBAL.g_login_name;
:CARGO_TAB.cr_dt := SYSDATE;
:CARGO_TAB.upd_by := :GLOBAL.g_login_name;
:CARGO_TAB.upd_dt := SYSDATE;
Sequence number should be set in item's "initial value" property:
|
|
|