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: How to access oracle function with ADO (VB)

Re: How to access oracle function with ADO (VB)

From: Tobias Handschuck <this-berlin_at_gmx.de>
Date: Thu, 20 Sep 2001 10:37:30 +0200
Message-ID: <9oc9t4$cedue$1@ID-52006.news.dfncis.de>


Solved my own problem:
You have to bind a return parameter, like

Set param = objCmd.CreateParameter("Return", 200, 4, 20) ' 200 = VarChar, 4 = return parameter, 20 = max. length)
objCmd.Parameters.append param

That's it !

"Tobias Handschuck" <this-berlin_at_gmx.de> schrieb im Newsbeitrag news:9oaaeh$c5qv9$1_at_ID-52006.news.dfncis.de...
> How can I access an oracle function with ADO (VB)?
> I've tried with
>
> objCmd.CommandText = "function_xy"
> objCmd.CommandType = 4 'AdoEnums.CommandType.STOREDPROC
> objCmd.Parameters.Refresh
> objCmd.ActiveConnection = srv
> Set objRS = CreateObject("adodb.recordset")
> objRS = objCmd.Execute
>
>
> The error that comes up is PLS 00221 (function_xy is not a procedure or is
> undefined).
> Within C++ it is possible to execute this function with the same command
> type.
>
> ideas?
>
> --
> Tobias Handschuck
>
>
Received on Thu Sep 20 2001 - 03:37:30 CDT

Original text of this message

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