Hi,
I am using ODAC 5.80.0.35 with Delphi 2006 and Oracle 9i.
Example code:
Proc := TOraStoredProc.Create(Self);
Proc.Session := OraSession;
Proc.StoredProcName := 'Test_Procedure';
Proc.Params.CreateParam(ftInteger, 'iUserKey', ptInput).Value := 1;
Proc.ExecProc;
The above code works with an Oracle procedure, but returns the following error when trying to call a function: ORA-6550... 'Test_Function’ is not a procedure or is undefined. Any ideas?
Thanks.
Lee.
Error with TOraStoredProc and function
-
Challenger
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53
-
Challenger
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53
error
Maybe you are missing grants?lasinsa wrote:I can execute the function in Oracle.
If I place a TOraStoredProc component on my form, and set the
StoredProcName that way, I can execute the function using OraStoredProc.ExecProc.
If you execute proc in SQLplus then it might work,
but when you execute the proc in your application as an user then it might not work (if it is not granted, Role is not set, etc.).
Also the next error you may get is be with Parameters. Make sure you have set the ParamCheck property to FALSE.
All IMHO.