Re: Stored Procedures / Oracle / ODBC

From: Philippe D. Nave <pdn_at_drmail.dr.att.com>
Date: 1996/05/31
Message-ID: <31AF726F.4581_at_drmail.dr.att.com>#1/1


Mark Deason wrote:
>
> Todd Bleeker <todd_bleeker_at_ccmail.fingerhut.com> wrote:
> >I believe that this is where Oracle and SQL*Server are very different.
> >Oracle cannot return a rs from within a stored procedure like SQL*Server
> >can. Oracle stored procedures are self contained and would typically be
> >used to accomplish action tasks. The select statement would have to be
> >coded in VB and the rs opened after the stored procedure completed.
> >Frustrating, isn't it.
> >
> >So you have yourself both an ODBC limitation and an Oracle stored procedure
> >limitation.
>
> Is this true? Can Oracle not return a recordset of rows through ODBC?

WHOA! TIME-OUT! Todd's statement is correct. Oracle does not return result sets from stored procedures. [You can, however, return a value from a stored function.]

Mark, this does not mean that Oracle cannot return a recordset of rows through ODBC. Oracle does this just fine; I make a living writing VB code that gets recordsets from Oracle. To get ORACLE to return a recordset of rows through ODBC, you just issue a SQL query in the usual fashion and catch the resulting recordset in VB (like you do with any other ODBC database).

Both SQL*Server and Oracle support 'stored procedures,' which are just blocks of code stored within the database that you can call like subroutines. Both SQL*Server and Oracle can perform database operations inside the stored procedures, but SQL*Server can also return a recordset from the stored procedure. This is a neat feature, and one that I wish Oracle would add, but I do just fine writing applications that use stored procedures in Oracle even though they don't return recordsets.

[has this shed any light?.....] Received on Fri May 31 1996 - 00:00:00 CEST

Original text of this message