Home » Developer & Programmer » Forms » Forms and DB PL/SQL packages (Oracle 9i and Forms 6i)
Forms and DB PL/SQL packages [message #464977] Sun, 11 July 2010 14:30 Go to next message
Amine
Messages: 376
Registered: March 2010
Senior Member

Hi All,
I have a form myform.fmb that uses a database PL/SQL package. Every time I re-compile the package, and when I execute myform.fmx, an error is issued telling me that the package has been modified. Then I go to Oracle Forms, re-compile the form myform.fmb (with only Ctrl + Shift + K), execute it and copy myform.fmx into the executable folder. Then everything works.
This doesn't happen with all my forms, only few of them. With others forms, when a re-compilation is done, I have only to exit the form and re-enter it.

So I thought about the Oracle Forms version the form was written with. Is there a solution for this ?

Thank you in advance,

Amine
Re: Forms and DB PL/SQL packages [message #465022 is a reply to message #464977] Mon, 12 July 2010 03:57 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
What's the exact error message?
Re: Forms and DB PL/SQL packages [message #465362 is a reply to message #465022] Tue, 13 July 2010 14:15 Go to previous messageGo to next message
Amine
Messages: 376
Registered: March 2010
Senior Member

ORA-04062: signature of package has been changed
Re: Forms and DB PL/SQL packages [message #465382 is a reply to message #465362] Tue, 13 July 2010 23:25 Go to previous messageGo to next message
mehediu
Messages: 46
Registered: February 2010
Location: Dhaka
Member

Hi , Mr. Amine

it is happening because you changed your package.

you just recompile your form. it will work.


regards
Md. Mehedi Hossain
Re: Forms and DB PL/SQL packages [message #465608 is a reply to message #465382] Thu, 15 July 2010 00:14 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Verify that when you compile your package you are not 'invalidating' other packages. If you are, then also recompile those packages.

You will always have to recompile the form if the parameter list of the package is changed.

David
Re: Forms and DB PL/SQL packages [message #465854 is a reply to message #465608] Thu, 15 July 2010 14:17 Go to previous messageGo to next message
Amine
Messages: 376
Registered: March 2010
Senior Member

the problem is not here.
Say I have form1.fmx, form2.fmx that both use the function my_pkg.func.

- form1.fmx and form2.fmx run well.
- I do some modifications in my_pkg.func which is a DB PL/SQL package.
- I re-compile my_pkg. the compilation is good.

- I run form1.fmx (execute a query form exemple that uses the package) then I have an error.
- I re-execute form1.fmx : it runs well.

- I run form2.fmx (execute a query form exemple that uses the package) then I have an error.
- I re-execute form2.fmx : the error remains. I have to
re-compile form2.fmb to resolve the problem.

How can I detect the difference between form1.fmb and form2.fmb ??

Thank you

Amine
Re: Forms and DB PL/SQL packages [message #465967 is a reply to message #465854] Fri, 16 July 2010 02:52 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What did you change in the package? Which components of the package do 'form1' and 'form2' use. If you change the columns returned by a procedure then you WILL have to recompile the form. If you added a new procedure or function to the package and it is NOT placed at the end of the list of components that are called by a particular form then you will have to recompile the form.

A bit of basic knowledge for you, Oracle Forms uses a list of object numbers at run time, this list is build from the list of component names at compile time. If you add a new name which falls into the range of components that you use, then the new component will be given the NUMBER of an existing component and when the form tries to use that number it will be pointed to a component that probably won't have the right structure (parameters).

I know that this is true for libraries and I believe that it is true for database objects as well.

David
Re: Forms and DB PL/SQL packages [message #466000 is a reply to message #465967] Fri, 16 July 2010 05:47 Go to previous messageGo to next message
Amine
Messages: 376
Registered: March 2010
Senior Member

I am essentially updating the body of one function of the package. I am not adding new parameters neither deleting some of them.
Re: Forms and DB PL/SQL packages [message #466006 is a reply to message #466000] Fri, 16 July 2010 06:08 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
From very vague memory, and I don't have working forms to check, I believe forms actually stores references to packages by line number (can't think why it would need to, especially in the body, probably it's a copy of how it handles references to libraries).
So if you add lines (or delete them) to a procedure/function any subsequent procedures/functions will now start on a different line number.
Any calls to those subsequent procedures/functions will then result in ORA-04062.

I'm fairly sure that applies to libraries, I'm less sure about db packages.

Also are you sure you're getting the same error in both forms?
I'm pretty sure ORA-04062 can only be cleared by a recompile.
Are you possibly getting ORA-04068 in form1 instead?
Re: Forms and DB PL/SQL packages [message #466013 is a reply to message #466006] Fri, 16 July 2010 07:10 Go to previous message
Amine
Messages: 376
Registered: March 2010
Senior Member

will check this once at work. But I am sure at 98% that it's the same error message ORA-04062 (signature of procedure has been changed)
Previous Topic: open an excel sheet from PL/SQL program
Next Topic: Populating non database column
Goto Forum:
  


Current Time: Fri Sep 20 06:36:27 CDT 2024