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 -> Stored Procedure to return value (records) through ODBC

Stored Procedure to return value (records) through ODBC

From: <craigfullerton_at_my-dejanews.com>
Date: Mon, 02 Nov 1998 09:57:36 GMT
Message-ID: <71jvmf$ul$1@nnrp1.dejanews.com>


I have encounted a few issues during my transition from MS SQL (of which i have considerable experience) to Oracle8. My current bugbear at the moment concerns returning values (through recordsets which i can access from ODBC) from a stored procedure. My MS SQL code would look something like this :

Create Procedure MyProcedure

   (@inKeyID numeric,

@iszVariable1 varchar(30),
@iszVariable2 varchar(30))

AS

   if @inKeyID > 0

      begin
         update tblMyTable set
            szVariable1 = @iszVariable1,
            szVariable2 = @iszVariable2
         where nKeyID = @inKeyID
         select @inKeyID as nKeyID
      end
   else
      begin
         insert tblMyTable values
           (@iszVariable1,
            @iszVariable2)
         select @@IDENTITY as nKeyID
      end

GO

which works very nicely. Now i'm trying to do something similiar in PL/SQL, but i can't see how to get the return value.

Any Ideas?

thanks in advance

---
craig fullerton
fab technology (pty) ltd
craig_at_fab.co.za

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Nov 02 1998 - 03:57:36 CST

Original text of this message

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