• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 534
  • Last Modified:

Error 201 Indeitfied functionname must be declared

hi,

when i created a funciton the in the back-end and try to run from the form or report i got this error ,  what is the reason ?

thank you,
nour911
0
nour911
Asked:
nour911
  • 13
  • 4
  • 4
  • +4
2 Solutions
 
EyalCommented:
try to call it like this...

databasename.dbo.functionname()
0
 
sachinpatil10dCommented:
Try this

without parameter
select * from dbo.functionName()

Open in new window


with parameter
select * from dbo.functionName(parametername1,parametername2,...)

Open in new window


if you still get error please give error details.
0
 
Muhammad Ahmad ImranDatabase DeveloperCommented:
have you connected to the proper database? if yes, you should get it.

try to execute the function through sql plus first, if successful, do it in forms or reports. You may check copying in forms or reports program unit as well

Hope this help

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
nour911Author Commented:

Thank you all,

when i run this function sqlplus it is working okay, but in the forms or report it is give me this error 201
0
 
nour911Author Commented:
when i run in the form

declare
 ret varchar2(50);
begin
ret := spell_number(10);
end;

----
when i do compile i got this error
error 201 indentifier spell_number must be decleared

-------------

0
 
Muhammad Ahmad ImranDatabase DeveloperCommented:
try this

declare
ret varchar2(50);
begin
select spell_number(10) into ret from dual;
end;
0
 
nour911Author Commented:
Leoahmad

i try but get same error
0
 
Muhammad Ahmad ImranDatabase DeveloperCommented:
apart from your function,
i would do this in simple sql

select sal,to_char(to_date(sal,'j'),'jsp') from emp;

       SAL TO_CHAR(TO_DATE(SAL,'J'),'JSP')
---------- ------------------------------------------------------------------------------
       800 eight hundred
      1600 one thousand six hundred
      1250 one thousand two hundred fifty
      2975 two thousand nine hundred seventy-five
      1250 one thousand two hundred fifty
      2850 two thousand eight hundred fifty
      2450 two thousand four hundred fifty
      3000 three thousand
      5000 five thousand
      1500 one thousand five hundred
      1100 one thousand one hundred
       950 nine hundred fifty
      3000 three thousand
      1300 one thousand three hundred

14 rows selected.
0
 
Shaju KumbalathCommented:
it is seems to be a "Privillege issue"

Grant required privilleges to execute the procedure to connected user
0
 
nour911Author Commented:

LeoAhmad

the problem is not only with this function, the problem with any function i created.

But i have anotehr database, when i tried to run the function from form it is working fine.

0
 
nour911Author Commented:
Shajukg

i grant all the priviliges to this user... but same error
0
 
Muhammad Ahmad ImranDatabase DeveloperCommented:
Have you tried this function creating in Forms Program units? if it works then surely you have privileges problem.
0
 
Shaju KumbalathCommented:
Are u connected as owner in forms or u connected with diff. user who has  aquired privilleges thru roles. If it is the second case u need explicit grants from owner to run the procedure.
0
 
nour911Author Commented:

Leoahmad

yes the function is working fine in forms programming units,
if it is priviliges problem ? what will be ??
0
 
nour911Author Commented:

Shajukg

i connect as the owner ,,
0
 
Shaju KumbalathCommented:
is  the function name case sensitive?
0
 
nour911Author Commented:
shajukg:

No
0
 
Shaju KumbalathCommented:
select * from all_objects where object_name ='SPELL_NUMBER';

-- put spell_number in caps only

0
 
nour911Author Commented:
Shajukg

when i try this
select * from all_objects where object_name ='SPELL_NUMBER';

i got this error:
ORA-06552: PL/SQL: compilation unit analysis terminated
ORA-06553: character set name is not recognized

then i try to desc all_objects
ORA-00942: table or view does not exist
0
 
nour911Author Commented:
how can i fix this problem ??
0
 
slightwv (䄆 Netminder) Commented:
I think the important error here is "character set name is not recognized"

Check the character sets between the two databases and your NLS_LANG from your client machine.  Make sure everything matches.
0
 
nour911Author Commented:
Ok i will tomorrow ,
Thank you
0
 
nour911Author Commented:
SlightWv

i check the character set in both PC they are same
0
 
slightwv (䄆 Netminder) Commented:
Character set of the PC or the value of the NLS_LANG environment variable versus the character set of the database?
0
 
nour911Author Commented:
ok
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 13
  • 4
  • 4
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now