473,396 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

oracleclient exception...

<as posted in the microsoft.public.dotnet.languages.adonet newsgroup>

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;

Nov 21 '05 #1
1 1472
guy
try the change below ...
in the SP make the ref cursor an OUT parameter not an IN OUT parameter

hth

guy

"Dan =o)" wrote:
<as posted in the microsoft.public.dotnet.languages.adonet newsgroup>

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
RC1 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;


Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kevin Vogt | last post by:
When initially loaded, my web application (below) takes ~120000 milliseconds to open its connection. But repeated executions take 0 milliseconds each. But when I wait for approx. 5 minutes and try...
4
by: ben | last post by:
Below is the error message I am receiving on a production server with the Oracle 9.2 client installed. However, on a Oracle 9.0 client installation on the development server the problem does not...
2
by: JJ | last post by:
Hi, I don't know if this is the correct newsgroup to post this question, but here goes. I have installed Visual Studio .Net Professional 2003. I checked the version and it is 7.1.3088. It...
2
by: Andrew | last post by:
I've : <asp:sqldatasource runat="server" id="sql" providername="System.Data.OracleClient" datasourcemode="DataReader" connectionstring="..." selectcommand="..." deletecommand="delete from tbl...
3
by: =?Utf-8?B?RFNJU3VwcG9ydA==?= | last post by:
I have an ASP.NET application runinng on IIS 5 .NET 1.1 Sp1 and recently we've been experiencing this error when the users are trying to print reports that connects to Oracle database. The only way...
4
by: =?Utf-8?B?RFNJU3VwcG9ydA==?= | last post by:
Hi, I have this ASP.NET application developed with VS.NET 2003 VB.NET and deplyed on Windows 2K server IIS 5. This application uses the following: - Oracle 10G databse - MS Data Access Block...
0
by: =?Utf-8?B?Q2hhbmUgRw==?= | last post by:
We recently updated our web service from .Net 1.1 to .Net 2.0. Our web services are using the Oracle Client provided by Microsoft. We are now randomly getting the following error when accessing...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.