Home » SQL & PL/SQL » SQL & PL/SQL » Procedures
Procedures [message #8459] Fri, 22 August 2003 01:18 Go to next message
yram
Messages: 75
Registered: February 2001
Member
I have 3 procedures in my user with the same name and parameter at

backend (SQL)
front end (Developer 2000)
and
Libraries(Developer 2000)

My question is which procedure will fire first

and what is the order of the execution of the procedures.

Regards
vairamuthu
Re: Procedures [message #8460 is a reply to message #8459] Fri, 22 August 2003 02:11 Go to previous messageGo to next message
Amit
Messages: 166
Registered: February 1999
Senior Member
Hi,
when you will try to create a new procedure with same name and same parameter , oracle will give error.

ERROR at line 1:
ORA-00955: name is already used by an existing object

Please let me know if i am wrong
Re: Procedures [message #8461 is a reply to message #8459] Fri, 22 August 2003 02:25 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
1. In the Form Module
2. In the library
3. In the database

You can test it yourself.

MHE
Re: Procedures [message #8462 is a reply to message #8460] Fri, 22 August 2003 02:40 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Well, you are..eurr..sort of... . In a pure database environment: you're right. No doubt. You should use packages btw, always...

But we're talking 'bout Forms here. You can create a database procedure prc$my_first, create a procedure in Forms with the same name and parameters and even create one with the same name and parameters in any library you attach. The order of execution is then as follows:
First Forms'll look for the procedure in the program units of the form module.
Then Forms will look at the libraries to see whether one contains a corresponding procedure. If more than one library contain a match, the first is taken. So the order of attaching the libraries is important.

Finally, if there's no match. Forms seeks the database for a match.

HTH,
MHE
Previous Topic: Trigger problem...
Next Topic: Oracle
Goto Forum:
  


Current Time: Fri May 10 11:05:22 CDT 2024