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

Home -> Community -> Usenet -> c.d.o.server -> Re: ASP with Oracle Stored Function Error

Re: ASP with Oracle Stored Function Error

From: Finn Ellebaek Nielsen <fen_at_changegroup.dk>
Date: Thu, 3 Jun 1999 08:43:55 +0100
Message-ID: <7j5887$4ge$1@news.inet.tele.dk>


Just wondering, is your PL/SQL stored procedure a procedure or a function? As you set up the "parameters" here you set up an input parameter and the return value from your "procedure", ie you set it up as a function where your second "parameter" is the value returned from the function.

The bind variables you see are an exact representation of the parameters you have set up.

HTH. Finn

jim walski <jwalski_at_deltanet.com> wrote in message news:7j49e0$hmf_at_chronicle.concentric.net...
> Hello,
>
> Oracle 7.3.4 NT
>
> i am trying to call a oracle stored with the following ASP (active server
> page) code. However it always returns an error when i pass parameters.
>
> Set objRec = Server.CreateObject("ADODB.Command")
> Set objRec.ActiveConnection = Session("classic_conn")
> objRec.CommandText = "testa"
> objRec.CommandType = 4
>
> objRec.Parameters.Append(objRec.CreateParameter("i_char",adVarchar,
> adParamInput,20,"10"))
> objRec.Parameters.Append(objRec.CreateParameter("v_error_cd",adVarchar,
> adParamReturnValue, 20))
> ObjRec.Execute
> ' Display the returned argument
> response.write "I Char= " & objRec.Parameters("i_char")
> response.write "Error Code= " & objRec.Parameters("v_error_cd")
> Set objRec.ActiveConnection = Nothing
>
> the criteria for the TESTA function is:
>
> Function TESTA (i_char IN VARCHAR2) Return VARCHAR2;
>
> All i receive is the following error:
>
> Microsoft OLE DB Provider for Oracle error '80040e14'
>
> ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments
> in call to 'TESTA' ORA-06550: line 1, column 7: PL/SQL: Statement ignored
>
> /classic/search_information.asp, line 35
>
> When i look at the SQL text in Oracle it has the following:
> begin :V001 := testa(:V002); end;
>
> What are the bind variables :v001 and :v002. Are these not set or is there
a
> way to check the values before the execute command?
>
> Any help would be appreciated.
>
> Thanks, Jim
>
>
>
>
>
>
Received on Thu Jun 03 1999 - 02:43:55 CDT

Original text of this message

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