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

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle vs. Delphi

Re: Oracle vs. Delphi

From: Todd Barry <tbarry_at_uspe.com>
Date: 1998/02/03
Message-ID: <34d75414.58345566@news.supernews.com>#1/1

On Tue, 03 Feb 1998 15:53:41 +0100, "Jaros³aw Palka" <jarek_at_kamsoft.com.pl> wrote:

>How Can I return result set from Oracle stored procedure (function) to
>Delphi as dataset ? I think that procedure must return cursor, but
>Delphi 2.0 doesn't recognize such parameter. Where is mistake ? Is it
>Oracle or Delphi fault ? Server is Oracle 7.3.2 on Windows NT.

You will need Delphi 3 to do this.

First, create a package:

CREATE PACKAGE MYPKG
IS
  TYPE CursorType IS REF CURSOR;
END MyPkg;

Then the procedure:

CREATE PROCEDURE RETURN_RESULT_SET
 (oCursor IN OUT MyPkg.CursorType) AS
BEGIN
  open oCursor for select * from SomeTable; END; Then in Delphi:

  1. Set the TStoredProc parameter as type Cursor.
  2. At this point, treat the TStoredProc component like a TQuery. (Use the Open method instead of ExecProc.)

-Todd Received on Tue Feb 03 1998 - 00:00:00 CST

Original text of this message

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