Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> A problem with calling Oracle procedure from Delphi.

A problem with calling Oracle procedure from Delphi.

From: Petri J. Riipinen <petri.riipinen_at_tele.fi>
Date: 1996/12/09
Message-ID: <58giug$ior@leivo.inet.fi>#1/1

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;

END crGetClassCount;

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,

Received on Mon Dec 09 1996 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US