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 -> Retrieving output parameter from Oracle

Retrieving output parameter from Oracle

From: Chong Pok <chongpok18_at_hotmail.com>
Date: Wed, 3 Sep 2003 15:53:03 +0800
Message-ID: <3f559de3$1@shknews01>


I am writing a Visual Basic 6.0 program in retrieving output parameter from a stored procedure in Oracle. I am using ado for the connection and the stored procedure can be executed properly in SQL Plus. The error message when I execute the ado command object is

ORA-06550: line1, column14;
PLS-00306: wrong number or types of arguments in call to
'SP_UP_GENSUMMARYSHT'

ORA-06550:line1, column 7;
PL/SQL: Statement ignored
I have been spending 2 days in tackling the problem but no prgress still. Your help is highly appreciated. Many thanks



Here's the code I am using in VB

    cmd.ActiveConnection = myDB.GetConnectionString()
    cmd.CommandText = "sp_up_gensummarysht"
    cmd.CommandType = adCmdStoredProc

    cmd.Parameters.Append cmd.CreateParameter("JobLeft", adInteger, adParamReturnValue)

    cmd.Parameters.Append cmd.CreateParameter("NextHoldJobNo", adInteger, adParamReturnValue)

    cmd.Parameters.Append cmd.CreateParameter("NextPrDwldJobKey", adInteger, adParamReturnValue)

'cannot execute the following code

    Set a = cmd.Execute()
    nJobLeft = a.Fields("JobLeft")
    nNextKeyJobHoldingSum = a.Fields("NextHoldJobNo")     nNextKeyJobPriceDwld = a.Fields("NextPrDwldJobKey")

    Set lobjDBHelper = Nothing
    GetNextKey = True
Exit Function

Here's the stored procedure
CREATE OR REPLACE PROCEDURE "TEMDB"."SP_UP_GENSUMMARYSHT"   JobLeft out Job_Price_Dwld.JobKey%type,   NextHoldJobNo out Job_HoldingSummary.JobNo%type,   NextPrDwldJobKey out Job_Price_Dwld.JobKey%type )
as
mysuccess number;
begin
  mysuccess := FN_UP_GENANALYSIS(JobLeft, NextHoldJobNo, NextPrDwldJobKey); end; Received on Wed Sep 03 2003 - 02:53:03 CDT

Original text of this message

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