Home » Developer & Programmer » Forms » Form 6i (FORMS_DDL used to create a function)
Form 6i (FORMS_DDL used to create a function) [message #522302] Thu, 08 September 2011 03:06 Go to next message
amit_garg3
Messages: 22
Registered: January 2006
Location: bangalore
Junior Member
Hi

I am using a form which create function to calculate value using form_ddl. When I used this program from superuser it will calculate correct value but in other user it calculate wrong value. I gave 'Create Procedure ' privilege to user too.But still problem exist.
Any solution for that problem.Pls reply.

Thanks


[EDITED by LF: modified topic title (was: "Form 6i")]

[Updated on: Tue, 13 September 2011 05:33] by Moderator

Report message to a moderator

Re: Form 6i [message #522303 is a reply to message #522302] Thu, 08 September 2011 03:18 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If it was about lack of privileges, people wouldn't be able to use the function. The fact that it returns a "wrong" result smells like an incorrectly written function.

What does it do, anyway? Could you share the code?
Re: Form 6i [message #522705 is a reply to message #522303] Tue, 13 September 2011 04:29 Go to previous messageGo to next message
amit_garg3
Messages: 22
Registered: January 2006
Location: bangalore
Junior Member
Hi
createsql is a varible

I am using following Code
createsql := 'Create or Replace Function GET_GISAMT RETURN NUMBER IS ' ||'l_amt NUMBER ;
BEGIN
SELECT month' || l_date ||
' into l_amt from gisrate where year = '||''''|| l_dyear ||'''' ||' and foryear = '||''''||l_foryear||''''||' and rate = '||''''||l_drate||''''||' ;
RETURN (l_amt) ;
EXCEPTION
WHEN NO_DATA_FOUND
THEN RETURN (0) ;
END; ' ;
FORMS_DDL(createsql);

Pls Reply.

Thanks
Re: Form 6i [message #522708 is a reply to message #522705] Tue, 13 September 2011 04:42 Go to previous message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
You need to compare the created function for the different users.
We've got no way of knowing what the problem is with the information supplied.

But - why are you creating a function on the fly? Why not have a permanent function that does what you need? It'd be easier to debug for starters.
Previous Topic: Trigger Cuasing error ORA-06502 and ORA-01403
Next Topic: Form 6i (which user is using which form?)
Goto Forum:
  


Current Time: Sun Sep 08 23:23:16 CDT 2024