Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ODBC and stored procedures
>I would just like to know if its possible to retrieve data returned from
>a stored procedure without binding parameters.
If you are using DAO through VBA/VB, you can enumerate the Parameters Collection for the QueryDef created for the stored procedure. You can prepare the QueryDef using the SQL syntax
Functions
{? = call FUNCTION(?,?)}
or
Procedures
{call PROCEDURE(?,?)
Set qdf = cnn.CreateQueryDef)"","{? = call FUNCTION(?,?)}"
Each "?" is a placeholder for a parameter. Once the QueryDef object is created, you then create a Recordset object.
set rst = qdf.OpenRecordSet()
You can then evaluate each parameter
qdf.Parameters(0)
to get the parameter value after the procedure is executed.
A few notes.
1. The function/procedure name must be in all caps.
2. You can not call packaged procedures in this manner. You must create a
stub to point to the packaged procedure.
3. The parameters collection is zero (0) based going from left to right.
Hope this helps. Sorry if I'm off topic.
Stephen Wellman Received on Fri May 28 1999 - 13:20:01 CDT
![]() |
![]() |