Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: ADO Problems With Stored Procedures

Re: ADO Problems With Stored Procedures

From: Patrick Joyal <please.reply_at_to.the.newsgroup>
Date: 2000/05/24
Message-ID: <392c2242@news>#1/1

I was having the same problem last week, so I can tell you how to solve this.

You have two option :

Use ODBC

or

Use ORACLE OLE DB (not Microsoft) available on www.oracle.com (registration is free)

I prefered the second option.

In both case, use the following syntax :

 .CommandText = "{call upsw_pkg.upsw_rset(?)}"

where ? correspond to a non-recordset parameter and avoid using spaces in your CommandText
( .CommandText = "{call upsw_pkg.upsw_rset (?) }" -> won't work )

hope it'll help

Praetorian wrote in message <8gh05t$i2e$1_at_nnrp1.deja.com>...
>I am using ADO 2.0 with VB6 to access an Oracle 8 stored procedure. The
>ADO command object uses the Microsoft OLE DB Oracle Provider
>(MSDAORA.1).
>
>The procedure uses only one input argument beyond the results set var.
>
>When I run the code I get the error:
>
>.... (8004Oe14) ORA06550 "wrong number or types of arguments in call to
>[procedure name]"
>
>I have tried this with and without a specific parameter for the results
>set in the Command object .CreateParameter statement, to no avail.
>
>Can't find any help on how to correct this.
>
>Code:
>
> Private cn as ADODB.Connection
> Private qy4 as ADODB.Command
>
> Set cn = New ADODB.Connection
> With cn
> .ConnectionTimeout = 3
> .CursorLocation = adUseClient
> .Provider = "MSDAORA.1"
> End With
>
> Set qy4 = New ADODB.Command
>
> cn.Open "Data Source=[my service name]; _
> User Id=[my user id];Password=[my password];"
>
> With qy4
> .CommandText = "upsw_pkg.upsw_rset"
> .CommandType = adCmdStoredProc
> .ActiveConnection = cn
> .Parameters.Append .CreateParameter _
> ("upsw_result", adNumeric, adParamInputOutput)
> .Parameters.Append .CreateParameter _
> ("bs_num", adVarChar, adParamInput, 30)
> End With
>
> qy4(0) = 0
> qy4(1) = "B/S 99-005%"
>
> qy4.Execute
>
>
>
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Wed May 24 2000 - 00:00:00 CDT

Original text of this message

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