Board index » delphi » Oracle: Stored Procedure in Package?

Oracle: Stored Procedure in Package?

Hallo,

Using:
- Delphi 6 Ent. UP2
- Oracle 9i 9.0.1

I've written an Oracle package. In this package I've put some datatype
definitions (via subtype...) and stored procedures. An example for such a
stored procedure is

procedure MyProc(
  aid IN TInteger,
  atitle IN TDescription,
  acode IN TSmallint,
  avalu IN TFloat) is
begin
   INSERT INTO MYTABLE
   VALUES (aid, atitle, acode, avalu);
end;

The used datatypes are encapsulations of the corresponding physical types
(TInteger = NUMBER(10), TSmallint = NUMBER(5), TDescription = VARCHAR2(50),
etc.)

In Delphi I've used a ADOStoredProc component. My code for execution is

with ADOStoredProc do begin
  Parameters[0].Value := ...
  Parameters[1.].Value := ...
  and so on...
  ExecProc; // <- here I get the error
end;

When ExecProc is called I get the error message "Unknown error". Also in the
Errors collection is no further entry.

What's wrong with execution of stored procedures in Oracle?

Best regards
Stephan Schneider

 

Re:Oracle: Stored Procedure in Package?


Quote
>I've written an Oracle package. In this package I've put some datatype
>definitions (via subtype...) and stored procedures. An example for such a
>stored procedure is

What's your package's and your procedure's name?? How do you specify
those in the TADOStoredProc object in Delphi ?

We did run into some problems way back in the D1 / BDE / Oracle 7.x
days - not sure if those still linger around.....

Marc

------------------------------------------------------------------------
Marc Scheuner                                          Software Engineer
Quest Software Canada                       Halifax, Nova Scotia, Canada
Email: marc.scheu...@quest.com                      http://www.quest.com

Other Threads