Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Stored Procedure in VB
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