Home » Developer & Programmer » Forms » Problem in accessing sequence.nextval in forms 6i,Database 10g
Problem in accessing sequence.nextval in forms 6i,Database 10g [message #125455] Sat, 25 June 2005 17:07 Go to next message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

Hi,
Please help me in sorting out this problem.
I have installed database 10g on a Solaris server. I didn't install the developer on my server. I have forms 6i installed on every client machine and I'm accesing database from the server to connect these forms to the database.
I'm actually working on a project and upgrading the customer's database from Oracle 7 to 10g.
I have come across an issue regarding sequence.

I have this block in my forms 6i:

DECLARE
 CURSOR c1 IS
 SELECT my_seq.NEXTVAL
 FROM dual;
 v_number NUMBER;
BEGIN
 OPEN c1;
 FETCH c1 INTO v_number;
 CLOSE c1;
END;

I'm actually generating this number and combinig it with different values to get one specific value but for the simplicity, I wrote this simple code because even this is not working.
Now if I write this code in SQL*Plus on client side (database is 10g on the server and this sequence is defined there) and run this code, it gives me the result successfully.
I have Daabase 9i and Forms 6i installed on my PC. If I run this code in my forms accesing my local 9i daabase, it compiles successfully.
But if I write this code in forms accessing the databse 10g on the server, it doesn't compile and gives the error message.
Right now, I just remember the error number but I don't remember the message because I don't have access to forms and database at this time while writing this message.
The error is ORA-00600
Please, tell me if anybody has an idea about it because I spent almost 5 hours in solving this issue but I couldn't get to the solution.
Please let me know if this issue is because of the combination of database 10g and forms6i?
If you want me to write the error message as well, I'll write it in my next post.
I'll be looking forward to your prompt reply.
Thanks in advance.

Saadat Ahmad

Re: Problem in accessing sequence.nextval in forms 6i,Database 10g [message #125460 is a reply to message #125455] Sat, 25 June 2005 19:08 Go to previous messageGo to next message
William Robertson
Messages: 1643
Registered: August 2003
Location: London, UK
Senior Member
A couple of wild guesses as I don't have Forms:
* Try giving the NEXTVAL expression a column alias in the cursor.
* Replace the explicit cursor with just "SELECT my_seq.NEXTVAL INTO v_number FROM dual".
Re: Problem in accessing sequence.nextval in forms 6i,Database 10g [message #125467 is a reply to message #125460] Sun, 26 June 2005 09:10 Go to previous messageGo to next message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

Thanks Mr. William for the reply.
I had already checked what you suggested but it didn't work.
Though I got a solution for this that create a function in database and return the concatinated value from that function and then we can get that value in the form and the code compiles successfully.
But this is not the solution for me as I have hundreds of program units which I'll need to work on.
So, I got the solution that I need to download patch 16 or 17 from metalink then I can work with forms 6i accessing the database 10g.
So, I'm searching the patch 17 now in metalinks.

Thank you again
Saadat Ahmad
Re: Problem in accessing sequence.nextval in forms 6i,Database 10g [message #125487 is a reply to message #125455] Sun, 26 June 2005 20:59 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Verify that your userid on 10g has the same permissions as your userid on the Oracle 7 instance. Specifically 'select any sequence'.

David
Re: Problem in accessing sequence.nextval in forms 6i,Database 10g [message #125515 is a reply to message #125487] Mon, 27 June 2005 03:39 Go to previous message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

Hi Martin,
After downloading patch 17 for forms from the metalinks and installing, my problem is solved.
Thank you so much anyway for replying me.

Saadat Ahmad
Previous Topic: Trap events
Next Topic: forms 9i - Getting data into non base table items
Goto Forum:
  


Current Time: Thu Sep 19 11:35:37 CDT 2024