RE: OracleClient exception...
From: Nitin (Nitin_at_discussions.microsoft.com)
Date: 10/21/04
- Next message: Sahil Malik: "Re: Passing Parameters through a linked server?"
- Previous message: Marshal Antony: "Re: Multi threading and database connections"
- In reply to: Dan =o\): "OracleClient exception..."
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 20 Oct 2004 21:07:01 -0700
can u check the parameter name u r using
is its name same as the name in oracle procedure,
i got the same error with 8i but when i changed the name of parameter
it worked, though its strange try it if it works
"Dan =o)" wrote:
> Hey guys,
>
> I'm stumped on this... Today I was asked to look into coverting our ODBC
> access to a Oracle database to the client that microsoft wrote and have come
> up against the lovely
>
> "ORA-06550: line 1, column 7: PLS-00306: wrong number or types of
> arguments in call to 'MSG_DATAREAD' "
>
> message... All I'm doing is converting the code from the stuff that's using
> OdbcConnection/Command etc to OracleConnection/Command etc so I know the
> stored procedure's all work fine.
>
>
>
> Here's the code that's failing:
>
> '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> ' get a reader for the record set with this msg number
> Dim dbcommand As OracleCommand = New OracleCommand
> dbcommand.Connection = dbData
> dbcommand.CommandType = CommandType.StoredProcedure
> dbcommand.CommandText = "MSG_DATAREAD"
>
> ' get a cursor out
> Dim param As OracleParameter = New OracleParameter
> param = dbCommand.Parameters.Add("RC1", OracleClient.OracleType.Cursor)
> param.Direction = ParameterDirection.Output
>
> ' pass in the msg number
> Dim msgnumParam As OracleParameter = New OracleParameter
> msgnumParam = dbcommand.Parameters.Add("MsgNumber", OracleType.VarChar,
> 50)
> msgnumParam.Direction = ParameterDirection.Input
> msgnumParam.Value = NullToBlank(m_szCurrentMsgNumber)
>
> Dim dbReader As OracleDataReader = dbcommand.ExecuteReader
>
> While dbreader.Read
>
> ' do some stuff with the data I get back
>
> End While
>
> dbreader.Close()
> '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
>
>
> Here's the Stored Procedure it's calling:
>
> /*
> Stored procedure MSG_DATAREAD
> -------------------------------------------
> */
> (
> MsgNumber IN VARCHAR2 DEFAULT NULL,
> RC1 IN OUT Omwb_emulation.globalPkg.RCT1
> )
> AS
> MsgNumber_ VARCHAR2(50) := MsgNumber;
> StoO_selcnt INTEGER;
> StoO_error INTEGER;
> StoO_rowcnt INTEGER;
> StoO_crowcnt INTEGER := 0;
> StoO_fetchstatus INTEGER := 0;
> StoO_errmsg VARCHAR2(255);
> StoO_sqlstatus INTEGER;
> BEGIN
> NULL;
> /*[SPCONV-ERR(6)]:(set DATEFORMAT) Manual conversion required*/
>
> OPEN RC1 FOR
>
> SELECT MsgNumber
> , MsgItem
> , Section
> , Field
> , Data
> FROM MSG_Data
> WHERE MsgNumber = MSG_DATAREAD.MsgNumber_
> ORDER BY MsgItem ;
> END MSG_DATAREAD;
>
>
>
>
- Next message: Sahil Malik: "Re: Passing Parameters through a linked server?"
- Previous message: Marshal Antony: "Re: Multi threading and database connections"
- In reply to: Dan =o\): "OracleClient exception..."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|