hi,
i'm using System.Data.OracleClient; but it seems not having Varchar2 and i
use Varchar instead. Then when i call a Oracle Procedure update a table with
varchar2, i got the following error:
==============
Error Message
==============
System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'UPDATE_DOC_NAME'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
at System.Data.OracleClient.OracleConnection.CheckErr or(OciHandle
errorHandle, Int32 rc)
at System.Data.OracleClient.OracleCommand.Execute(Oci Handle
statementHandle, CommandBehavior beha
vior, Boolean isReader, Boolean needRowid, OciHandle& rowidDescriptor,
ArrayList& refCursorParameter
Ordinals)
at System.Data.OracleClient.OracleCommand.Execute(Oci Handle
statementHandle, CommandBehavior beha
vior, Boolean needRowid, OciHandle& rowidDescriptor)
at System.Data.OracleClient.OracleCommand.ExecuteNonQ ueryInternal(Boolean
needRowid, OciHandle& r
owidDescriptor)
at System.Data.OracleClient.OracleCommand.ExecuteNonQ uery()
at SynESDForm.Class1.Main(String[] args)
==============
C# source code:
==============
cmd.CommandText = "ESD_DLFORM_PKG.update_doc_name";
cmd.CommandType = CommandType.StoredProcedure;
//cmd.Parameters.Add(new OracleParameter("a1",
OracleType.Cursor)).Direction = ParameterDirection.Output;
//cmd.Parameters.Add(new OracleParameter("a2",
OracleType.Cursor)).Direction = ParameterDirection.Output;
//cmd.Parameters.Add(new OracleParameter("doc_id",
OracleType.VarChar)).Direction = ParameterDirection.Input;
//cmd.Parameters.Add(new OracleParameter("doc_name",
OracleType.VarChar)).Direction = ParameterDirection.Input;
OracleParameter paramDocID = new OracleParameter("p_doc_id",
OracleType.VarChar, 9, "DOCID");
paramDocID.Direction = ParameterDirection.Input;
paramDocID.Value = strDocID;
Console.WriteLine("strDocID: " + strDocID);
cmd.Parameters.Add(paramDocID);
cmd.ExecuteNonQuery();
==============
Oracle Procedure
==============
PROCEDURE update_doc_name (
p_doc_id IN ABC_DLFORM.DOCID%TYPE,
p_doc_name IN ABC_DLFORM.DOCNAME%TYPE
);
where DOCID and DOCNAME are varchar2 datatype 1 4524
fixed!
thanks!
"Mullin Yu" <mu*******@ctil.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl... hi,
i'm using System.Data.OracleClient; but it seems not having Varchar2 and i use Varchar instead. Then when i call a Oracle Procedure update a table
with varchar2, i got the following error:
============== Error Message ==============
System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'UPDATE_DOC_NAME' ORA-06550: line 1, column 7: PL/SQL: Statement ignored
at System.Data.OracleClient.OracleConnection.CheckErr or(OciHandle errorHandle, Int32 rc) at System.Data.OracleClient.OracleCommand.Execute(Oci Handle statementHandle, CommandBehavior beha vior, Boolean isReader, Boolean needRowid, OciHandle& rowidDescriptor, ArrayList& refCursorParameter Ordinals) at System.Data.OracleClient.OracleCommand.Execute(Oci Handle statementHandle, CommandBehavior beha vior, Boolean needRowid, OciHandle& rowidDescriptor) at
System.Data.OracleClient.OracleCommand.ExecuteNonQ ueryInternal(Boolean needRowid, OciHandle& r owidDescriptor) at System.Data.OracleClient.OracleCommand.ExecuteNonQ uery() at SynESDForm.Class1.Main(String[] args)
============== C# source code: ==============
cmd.CommandText = "ESD_DLFORM_PKG.update_doc_name"; cmd.CommandType = CommandType.StoredProcedure; //cmd.Parameters.Add(new OracleParameter("a1", OracleType.Cursor)).Direction = ParameterDirection.Output; //cmd.Parameters.Add(new OracleParameter("a2", OracleType.Cursor)).Direction = ParameterDirection.Output; //cmd.Parameters.Add(new OracleParameter("doc_id", OracleType.VarChar)).Direction = ParameterDirection.Input; //cmd.Parameters.Add(new OracleParameter("doc_name", OracleType.VarChar)).Direction = ParameterDirection.Input; OracleParameter paramDocID = new OracleParameter("p_doc_id", OracleType.VarChar, 9, "DOCID"); paramDocID.Direction = ParameterDirection.Input; paramDocID.Value = strDocID; Console.WriteLine("strDocID: " + strDocID); cmd.Parameters.Add(paramDocID);
cmd.ExecuteNonQuery();
============== Oracle Procedure ============== PROCEDURE update_doc_name ( p_doc_id IN ABC_DLFORM.DOCID%TYPE, p_doc_name IN ABC_DLFORM.DOCNAME%TYPE );
where DOCID and DOCNAME are varchar2 datatype
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: cschang |
last post by:
My system is on a NT4 (w/SP6a) running IIS 4.
I am developing a page that query one record from my Oracle DB 8.1.6 on
a separate machine. I am using the MS ODBC for Oracle drive. In my
ASP page...
|
by: s_gemberling |
last post by:
Here is the code that calls the Oracle package:
Function b_GetRecords(sTableName, sRecordName)
on error resume next
dim cmd, objParameter
Set conn =...
|
by: Jagdip Singh Ajimal |
last post by:
I have a new VB 6 project, and I have successfully created a data
environment that connects to my oracle server (they don't make this
easy!!).
In my oracle server, I have the following stored...
|
by: stephane.traumat |
last post by:
Hello,
I already succeed to call a stored procedure in Oracle but only simple
ones with one output value and several inputs. I don't any idea left
so any help would be great :) Thanks
But on...
|
by: CJM |
last post by:
Repeated for the benefit of m.p.i.asp.general, which I forgot to include in
the original posting...
"CJM" <cjmnews04@REMOVEMEyahoo.co.ukwrote in message
news:4lo3f8F2shqtU1@individual.net...
|
by: zrtv |
last post by:
hi All,
Iam new in oracle stored procedure, i have one stored procedure and it has to be accessed from vb6. my stored procedure as follows
-- employee salary will be entered by the user and...
|
by: ESHA1 |
last post by:
CREATE OR REPLACE procedure TEST_EMAIL(errbuf OUT VARCHAR2,
retcode OUT VARCHAR2,
p_from_date date,
p_to_date date,
P_CANDIDATE_NAME VARCHAR2) as
...
|
by: gaurim |
last post by:
I am facing the coding proble in the following Stored Procedure wherein I am trying to create a table after deleting it. and then I am trying to insert records from two other tables based on certain...
|
by: Mikael Vehkajärvi |
last post by:
Hello
I am running ASP.NET (C#) using Oracle (PL/SQL, provider ODP.NET
11.1.0.6.20) and I have a procedure which at the moment returns a table of
records. The code below demonstrates this.
...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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...
|
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...
|
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...
|
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...
|
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,...
| |