Home » Developer & Programmer » Forms » Selecting sequence.nextval "ORA-00600" Error.
Selecting sequence.nextval "ORA-00600" Error. [message #162631] Sun, 12 March 2006 12:39 Go to next message
Achilles
Messages: 15
Registered: February 2006
Junior Member
Hello all

I'm trying to select the "Sequence.nextval" into a variable under forms. But I get the error
 
ORA-00600: internal error code, argument:[17069], [52191548],[],[],[],[],[],[]

I dont know whats wrong. I tried selecting the value in the "Pre Insert" Trigger on the block. I even tried it in the "When_BUTTON_PRESSED" trigger. but it wont work.

Here's the line of code that I want to execute:
Select REF_GEN.NEXTVal into variable_name From Dual;


I tried the Field Name instead of the Variable name as well, but no use.

Any ideas why this is happening?

I'm using Oracle 10g with Forms 6i

Thanks
Achilles.
Re: Selecting sequence.nextval "ORA-00600" Error. [message #162829 is a reply to message #162631] Mon, 13 March 2006 14:53 Go to previous messageGo to next message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
Hi,

An ORA-00600: internal error code is a case for Oracle-Support.

You could try the following:
Make a package with a function that returns the nextsequence number. Call that package function and not directly the way you did it.

HTH,

Regards,

Rob Zijlstra
Re: Selecting sequence.nextval "ORA-00600" Error. [message #163058 is a reply to message #162631] Tue, 14 March 2006 19:32 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What data type is your 'variable_name'? Did you do a Ctrl-Shft-K (compile all) before doing the Ctrl-T (generate)? Are you signed on to the database? Do you have access to the sequence?

And PLEASE always create these keys in the When-Create-Record trigger, especially if you have subordinate detail records to also be created.

David
Re: Selecting sequence.nextval "ORA-00600" Error. [message #163368 is a reply to message #162631] Thu, 16 March 2006 07:41 Go to previous messageGo to next message
Achilles
Messages: 15
Registered: February 2006
Junior Member
Hello...

I tried everything you mentioned but still I get the same error, so Now I'm downloading Oracle Developer Suite 10g, as I mentioned in my previous post, becuase I do not have support.

I'll get back to you once I'm finished with the download/install of Developer Suite 10g.

Thanks for your time
Achilles.
Re: Selecting sequence.nextval "ORA-00600" Error. [message #163488 is a reply to message #163368] Thu, 16 March 2006 21:23 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I assume that you have the right 'grant' permissions on the sequence.

Can you get it to work in SQL*Plus using the userid through which you are running your form?

David
Re: Selecting sequence.nextval "ORA-00600" Error. [message #163915 is a reply to message #163488] Mon, 20 March 2006 15:02 Go to previous messageGo to next message
Achilles
Messages: 15
Registered: February 2006
Junior Member
Yes, I created the sequence with the same userid as the one used in forms. If I issue the same statement in SQL Plus, it works fine.
Re: Selecting sequence.nextval "ORA-00600" Error. [message #163961 is a reply to message #163915] Tue, 21 March 2006 00:03 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What is the datatype of the field into which you are placing the 'nextval'? Do you have it defined as 'updatable'?

David
Re: Selecting sequence.nextval "ORA-00600" Error. [message #164292 is a reply to message #163961] Wed, 22 March 2006 16:08 Go to previous messageGo to next message
Achilles
Messages: 15
Registered: February 2006
Junior Member
The datatype of the field is char. Therefore, I use the To_Char function to convert the sequence.nextval into a char.

I even used a variable of type Number to just retrieve the Sequence.nextval into that variable, but no use.
Re: Selecting sequence.nextval "ORA-00600" Error. [message #164536 is a reply to message #164292] Thu, 23 March 2006 22:20 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Straight from the Reference Manual.

Pre-Insert Trigger examples
This example assigns a primary key field based on a sequence number, and then writes a row into an auditing table, flagging creation of a new order.
DECLARE
   CURSOR next_ord IS
      SELECT orderid_seq.NEXTVAL
        FROM dual;
BEGIN
/*
** Fetch the next sequence number from the
** explicit cursor directly into the item in
** the Order record. Could use SELECT...INTO,
** but explicit cursor is more efficient.
*/
   OPEN next_ord;

   FETCH next_ord
    INTO :Order.OrderId;

   CLOSE next_ord;
/*
** Make sure we populated a new order id ok...
*/
   IF :Order.OrderId IS NULL THEN
      Message ('Error Generating Next Order Id');
      RAISE Form_Trigger_Failure;
   END IF;
/*
** Insert a row into the audit table
*/
   INSERT INTO ord_audit
               (orderid,
                operation,
                username,
                timestamp)
        VALUES (:Order.OrderId,
                'New Order',
                USER,
                SYSDATE);
END;
David
Previous Topic: urgent help on text_io package
Next Topic: how to create new status bar in forms9i?
Goto Forum:
  


Current Time: Fri Sep 20 04:41:39 CDT 2024