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 -> Re: Stored Procedure in VB

Re: Stored Procedure in VB

From: mark tomlinson <marktoml_at_gdi.net>
Date: 1998/02/02
Message-ID: <34d8d393.233491713@newshost.us.oracle.com>#1/1

This works with Oracles driver, (but not some of the others...):

Private Sub Command1_Click()
' NOTE: Oracle 7 cannot return a result set from a stored procedure.

' create procedure test (c1 in out number)
' as
' begin
' c1 := c1 + 15;
' end;

Dim RdoEnvironment As RdoEnvironment
Dim RdoDatabase As rdoConnection
Dim RdoRecordset As rdoResultset
Dim RdoQrydef As RdoQuery

Set RdoEnvironment = rdoEnvironments(0)
Set RdoDatabase = RdoEnvironment.OpenConnection("", rdDriverNoPrompt, False, "DSN=ORA32;UID=SCOTT;PWD=TIGER;")

Set RdoQrydef = RdoDatabase.CreateQuery("q1", "{call test( ? )}")

RdoQrydef(0).Direction = rdParamInputOutput
RdoQrydef(0).Type = rdTypeNUMERIC
RdoQrydef(0).Value = 10

Set RdoRecordset = RdoQrydef.OpenResultset(rdOpenForwardOnly, rdConcurReadOnly)

MsgBox RdoQrydef(0)

End Sub Received on Mon Feb 02 1998 - 00:00:00 CST

Original text of this message

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