Home » Developer & Programmer » Forms » ORA-00600: internal error code, while compiling oracle forms 6i. (oracle forms 6i,on windows vista home edition. oracle 10g database)
ORA-00600: internal error code, while compiling oracle forms 6i. [message #411429] Fri, 03 July 2009 09:25 Go to next message
novice1
Messages: 15
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 Go to previous messageGo to next message
cookiemonster
Messages: 12403
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 #411433 is a reply to message #411430] Fri, 03 July 2009 09:57 Go to previous messageGo to next message
novice1
Messages: 15
Registered: September 2007
Junior Member
Hi,

i wrote the sequence insertion logic from db side by using triggers,now the form is compiling with out errors.

can we write the primary key sequence insertion logic from forms ,if yes please advice how to do it.

Thanks
Sudhir
Re: ORA-00600: internal error code, while compiling oracle forms 6i. [message #411436 is a reply to message #411429] Fri, 03 July 2009 10:21 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I concur: ORA-00600/ORA-07445/ORA-03113 = Oracle bug => search on Metalink and/or call Oracle support

Regards
Michel
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 Go to previous message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
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:

./fa/6461/0/
Previous Topic: Populating LOV with Like operator
Next Topic: creating a pop up window with a number generated.
Goto Forum:
  


Current Time: Sat Dec 03 14:15:38 CST 2016

Total time taken to generate the page: 0.08236 seconds