Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> A problem with calling Oracle procedure from Delphi.
Hi there folks.
I have this annoying problem with one Delphi program when I'm trying to call a stored procedure in Oracle.
My procedure is:
PROCEDURE TestProc (
oCount OUT INTEGER32, oStatus OUT INTEGER32) IS BEGIN oCount := 5; oStatus := 2;
This is defined inside a package, where I define INTEGER32 as:
TEMPNUM NUMBER(9);
SUBTYPE INTEGER32 IS TEMPNUM%TYPE;
Ok, so far so good.
When I define a TStoredProc in Delphi and give it the name of the procedure (fully qualified with the name of the package) it finds out the OCOUNT and OSTATUS just fine and gives them "float" type.
But when I try to execproc, the program always stops with the error:
General SQL-error. ORA-06502: PL/SQL: numeric or value error ORA-06512: at "SYSTEM.TESTPACK", line 30 ORA-06512: at line 1'...
I made a little testprogram with PL/SQL just to see if I could call the above procedure. It works just fine.
Oh, and I tried defining INTEGER and NUMBER instead of my own INTEGER32 and they don't work either.
So, what's the magic in calling stored procedure with OUT-parameters from Delphi?
Peace,
![]() |
![]() |