473,399 Members | 4,254 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,399 software developers and data experts.

calling oracle stored proc from .net

Hello Everyone,

I am trying to call a oracle stored proc from .net code and I am getting
an error
PLS-00306: wrong number or types of arguments in call to KSSP_MEMBER_NEW. I
counted all the number of parameters that I am passing and they seem to be
ok, but type can be the problem. In oracle stored proc , the type is defined
as for example: dayPhone IN MEMBERTable.DayPhone%type
In my ocde I am definig day phone as DbType.string
db.AddInParameter(dbCommand, "dayPhone", DbType.String,
strList[137].ToString());

Is there any way I can define the dayPhone differently.
Jun 11 '07 #1
3 4108
bob
Hi,
if using the Oracle client
OracleType.Varchar
hth
Bob
On Mon, 11 Jun 2007 12:29:00 -0700, Vinki
<Vi***@discussions.microsoft.comwrote:
>Hello Everyone,

I am trying to call a oracle stored proc from .net code and I am getting
an error
PLS-00306: wrong number or types of arguments in call to KSSP_MEMBER_NEW. I
counted all the number of parameters that I am passing and they seem to be
ok, but type can be the problem. In oracle stored proc , the type is defined
as for example: dayPhone IN MEMBERTable.DayPhone%type
In my ocde I am definig day phone as DbType.string
db.AddInParameter(dbCommand, "dayPhone", DbType.String,
strList[137].ToString());

Is there any way I can define the dayPhone differently.
Jun 11 '07 #2
I am using oracleclient, but I want to use enterprise library too and with
enterprise library if I try to use oracleType.varchar, I get a syntax errror
The best overloaded method match for
'Microsoft.Practices.EnterpriseLibrary.Data.Databa se.AddInParameter(System.Data.Common.DbCommand,
string, System.Data.DbType, object)' has some invalid arguments
This is what my code looks like
db.AddInParameter(dbCommand, "dayPhone", OracleType.VarChar,
strList[9].ToString().Trim());

"bob" wrote:
Hi,
if using the Oracle client
OracleType.Varchar
hth
Bob
On Mon, 11 Jun 2007 12:29:00 -0700, Vinki
<Vi***@discussions.microsoft.comwrote:
Hello Everyone,

I am trying to call a oracle stored proc from .net code and I am getting
an error
PLS-00306: wrong number or types of arguments in call to KSSP_MEMBER_NEW. I
counted all the number of parameters that I am passing and they seem to be
ok, but type can be the problem. In oracle stored proc , the type is defined
as for example: dayPhone IN MEMBERTable.DayPhone%type
In my ocde I am definig day phone as DbType.string
db.AddInParameter(dbCommand, "dayPhone", DbType.String,
strList[137].ToString());

Is there any way I can define the dayPhone differently.
Jun 11 '07 #3
The best overloaded method match for
'Microsoft.Practices.EnterpriseLibrary.Data.Databa se.AddInParameter(System.Data.Common.DbCommand,
string, System.Data.DbType, object)' has some invalid arguments
This is what my code looks like
db.AddInParameter(dbCommand, "dayPhone", OracleType.VarChar,
strList[9].ToString().Trim());
Vinki - You cannot use an OracleType where a DbType is called for. I would
trying the following and see if it works.

db.AddInParameter(dbCommand, "dayPhone", DbType.String,
strList[9].ToString().Trim());

or ...
db.AddInParameter(dbCommand, "dayPhone", DbType.AnsiString,
strList[9].ToString().Trim());

Oracle should have a document that maps the OracleType values and .Net Type
values to DbType values. This would help you figure out which DbType is
most appropriate for OracleType.VarChar.

--
Gregg Walker
Jun 12 '07 #4

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

Similar topics

1
by: Jim Heavey | last post by:
Hello, I have an update stored procedure which is in a package. In my code I create all of the paramters and then call the stored procedure with "ExecuteNonQuery()" method of the command. The...
6
by: JV | last post by:
A ref cursor data type can obviously be returned as an output parameter of a stored procedure, but can an ASP.NET application call an oracle proc that uses a ref cursor as an input parameter? If...
1
by: lottoman2000 | last post by:
Hello Team.. No, I am not posting in the wrong forum :). I meant to check if the MS pros have read/heard of anything about Oracle Lite 10R2 and its support for .Net Stored Procedure.. Oracle docs...
0
by: Tom | last post by:
Looking for some help with stored procedure call issues. Conceptually, I need to pass a data structure as the sole parameter to the Oracle stored procedure. Sounds simple enough....but how? ...
14
by: krishna1412 | last post by:
Currently i am working in a project of report generation in MS ACCESS. The tables are in sql server 2000. I have to write stored proc in ms access. Illustration: I am having a stored proc...
0
by: =?Utf-8?B?Vmlua2k=?= | last post by:
I am trying to call oracle stored proc in .net. I also want to use enterprise library. when I do db.AddInParameter(dbCommand, "dayPhone", OracleType.VarChar, strList.ToString().Trim()); I get...
8
by: colmkav | last post by:
Can someone tell me how I can access the return value of a function called from Oracle as opposed to a store proc from oracle? my oracle function is get_num_dates_varposfile. I am only used to...
23
by: Gloops | last post by:
Hello everybody, Is anyone able to give me some indications about how to develop an Access interface for an Oracle database ? I dispose of Access 2003 (11.6566.8107) SP2, Oracle 9i 9.2.0.1.0...
4
by: raghuvendra | last post by:
Hi I have a jsp page with 4 columns: namely Category name , Category order, Input field and a submit button. All these are aligned in a row. And Each Category Name has its corresponding Category...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.