dbTalk Databases Forums  

PLS-00307 Too many declarations of ...

comp.databases.oracle.server comp.databases.oracle.server


Discuss PLS-00307 Too many declarations of ... in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Vojta
 
Posts: n/a

Default PLS-00307 Too many declarations of ... - 05-22-2007 , 05:04 AM






Please, can you advise? I declared function in package:

FUNCTION CheckManufacturersDict RETURN BOOLEAN IS
result BOOLEAN DEFAULT TRUE;
BEGIN
/*
Calculate result value based on some table values
*/
RETURN result;
END CheckManufacturersDict;

PROCEDURE DoSomething IS
BEGIN
IF CheckManufacturersDict THEN -- I get error PLS-00307 here
-- Do osmething
END IF;
END DoSomething;

If i try to compile it I get error "PLS-00307 Too many declarations of
CheckManufacturersDict match this call" on line IF...

But if I change function result to VARCHAR2 instead of BOOLEAN it is
compiled without any errors:

FUNCTION CheckManufacturersDict RETURN VARCHAR2 IS
result VARCHAR2(1) DEFAULT 'Y';
BEGIN
/*
Calculate result value based on some table values
*/
RETURN result;
END CheckManufacturersDict;

PROCEDURE DoSomething IS
BEGIN
IF CheckManufacturersDict = 'N' THEN
-- Do osmething
END IF;
END DoSomething;

How can I make it working with BOOLEAN return type please?

Thank you!




Reply With Quote
  #2  
Old   
Vladimir M. Zakharychev
 
Posts: n/a

Default Re: PLS-00307 Too many declarations of ... - 05-22-2007 , 08:42 AM






On May 22, 2:04 pm, "Vojta" <r... (AT) centrum (DOT) cz> wrote:
Quote:
Please, can you advise? I declared function in package:

FUNCTION CheckManufacturersDict RETURN BOOLEAN IS
result BOOLEAN DEFAULT TRUE;
BEGIN
/*
Calculate result value based on some table values
*/
RETURN result;
END CheckManufacturersDict;

PROCEDURE DoSomething IS
BEGIN
IF CheckManufacturersDict THEN -- I get error PLS-00307 here
-- Do osmething
END IF;
END DoSomething;

If i try to compile it I get error "PLS-00307 Too many declarations of
CheckManufacturersDict match this call" on line IF...

But if I change function result to VARCHAR2 instead of BOOLEAN it is
compiled without any errors:

FUNCTION CheckManufacturersDict RETURN VARCHAR2 IS
result VARCHAR2(1) DEFAULT 'Y';
BEGIN
/*
Calculate result value based on some table values
*/
RETURN result;
END CheckManufacturersDict;

PROCEDURE DoSomething IS
BEGIN
IF CheckManufacturersDict = 'N' THEN
-- Do osmething
END IF;
END DoSomething;

How can I make it working with BOOLEAN return type please?

Thank you!
Check the package for another copy of the function with the same
footprint (that is, the same name, the same return type, and probably
some default parameters.)

Regards,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com



Reply With Quote
  #3  
Old   
Vladimir M. Zakharychev
 
Posts: n/a

Default Re: PLS-00307 Too many declarations of ... - 05-22-2007 , 12:19 PM



On May 22, 2:04 pm, "Vojta" <r... (AT) centrum (DOT) cz> wrote:
Quote:
Please, can you advise? I declared function in package:

FUNCTION CheckManufacturersDict RETURN BOOLEAN IS
result BOOLEAN DEFAULT TRUE;
BEGIN
/*
Calculate result value based on some table values
*/
RETURN result;
END CheckManufacturersDict;

PROCEDURE DoSomething IS
BEGIN
IF CheckManufacturersDict THEN -- I get error PLS-00307 here
-- Do osmething
END IF;
END DoSomething;

If i try to compile it I get error "PLS-00307 Too many declarations of
CheckManufacturersDict match this call" on line IF...

But if I change function result to VARCHAR2 instead of BOOLEAN it is
compiled without any errors:

FUNCTION CheckManufacturersDict RETURN VARCHAR2 IS
result VARCHAR2(1) DEFAULT 'Y';
BEGIN
/*
Calculate result value based on some table values
*/
RETURN result;
END CheckManufacturersDict;

PROCEDURE DoSomething IS
BEGIN
IF CheckManufacturersDict = 'N' THEN
-- Do osmething
END IF;
END DoSomething;

How can I make it working with BOOLEAN return type please?

Thank you!
Check the package for another copy of the function with the same
footprint (that is, the same name, the same return type, and probably
some default arguments.)

Regards,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com



Reply With Quote
  #4  
Old   
Vladimir M. Zakharychev
 
Posts: n/a

Default Re: PLS-00307 Too many declarations of ... - 05-22-2007 , 01:36 PM



On May 22, 2:04 pm, "Vojta" <r... (AT) centrum (DOT) cz> wrote:
Quote:
Please, can you advise? I declared function in package:

FUNCTION CheckManufacturersDict RETURN BOOLEAN IS
result BOOLEAN DEFAULT TRUE;
BEGIN
/*
Calculate result value based on some table values
*/
RETURN result;
END CheckManufacturersDict;

PROCEDURE DoSomething IS
BEGIN
IF CheckManufacturersDict THEN -- I get error PLS-00307 here
-- Do osmething
END IF;
END DoSomething;

If i try to compile it I get error "PLS-00307 Too many declarations of
CheckManufacturersDict match this call" on line IF...

But if I change function result to VARCHAR2 instead of BOOLEAN it is
compiled without any errors:

FUNCTION CheckManufacturersDict RETURN VARCHAR2 IS
result VARCHAR2(1) DEFAULT 'Y';
BEGIN
/*
Calculate result value based on some table values
*/
RETURN result;
END CheckManufacturersDict;

PROCEDURE DoSomething IS
BEGIN
IF CheckManufacturersDict = 'N' THEN
-- Do osmething
END IF;
END DoSomething;

How can I make it working with BOOLEAN return type please?

Thank you!
Check the package for another copy of the function with the same
footprint (that is, the same name, the same return type, and probably
some default parameters.)

Regards,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com



Reply With Quote
  #5  
Old   
Vladimir M. Zakharychev
 
Posts: n/a

Default Re: PLS-00307 Too many declarations of ... - 05-23-2007 , 12:31 AM



On May 22, 10:36 pm, "Vladimir M. Zakharychev"
<vladimir.zakharyc... (AT) gmail (DOT) com> wrote:
Quote:
On May 22, 2:04 pm, "Vojta" <r... (AT) centrum (DOT) cz> wrote:



Please, can you advise? I declared function in package:

FUNCTION CheckManufacturersDict RETURN BOOLEAN IS
result BOOLEAN DEFAULT TRUE;
BEGIN
/*
Calculate result value based on some table values
*/
RETURN result;
END CheckManufacturersDict;

PROCEDURE DoSomething IS
BEGIN
IF CheckManufacturersDict THEN -- I get error PLS-00307 here
-- Do osmething
END IF;
END DoSomething;

If i try to compile it I get error "PLS-00307 Too many declarations of
CheckManufacturersDict match this call" on line IF...

But if I change function result to VARCHAR2 instead of BOOLEAN it is
compiled without any errors:

FUNCTION CheckManufacturersDict RETURN VARCHAR2 IS
result VARCHAR2(1) DEFAULT 'Y';
BEGIN
/*
Calculate result value based on some table values
*/
RETURN result;
END CheckManufacturersDict;

PROCEDURE DoSomething IS
BEGIN
IF CheckManufacturersDict = 'N' THEN
-- Do osmething
END IF;
END DoSomething;

How can I make it working with BOOLEAN return type please?

Thank you!

Check the package for another copy of the function with the same
footprint (that is, the same name, the same return type, and probably
some default parameters.)

Regards,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com
Sorry for posting the same message 3 times in a row - there was a
glitch in Google Groups' web interface. It was saying that there was
an error and the post didn't get through, so I retried a couple more
times...

Regards,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.