TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dibyajyoti Palata
1.5k
275
14.3k
How to get employee details using stored procedure in oracle database
Jul 15 2020 9:46 AM
Help me, anyone, I am new in Oracle access in c# asp.net.
using
(OracleConnection objConn =
new
OracleConnection(strConnection)
{
OracleCommand command =
new
OracleCommand();
command.Connection = objConn;
command.CommandText =
"SP_GET_EMPLOYEE_DETAIL"
;
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add(
"VARCALLDATE"
, OracleDbType.Varchar2).Value = strdate;
command.Parameters.Add(
"VARUCID1"
, OracleDbType.Varchar2).Value = CODE1;
command.Parameters.Add(
"VARUCID2"
, OracleDbType.Varchar2).Value = CODE2;
command.Parameters.Add(
"VARUCID3"
, OracleDbType.Varchar2).Value = CODE3;
command.Parameters.Add(
"VARUCID4"
, OracleDbType.Varchar2).Value = CODE4;
command.Parameters.Add(
"VARUCID5"
, OracleDbType.Varchar2).Value = CODE5;
try
{
objConn.Open();
command.ExecuteNonQuery();
adapter =
new
OracleDataAdapter(command);
adapter.Fill(ds);
objConn.Close();
Gridlist.DataSource = ds.Tables[0];
Gridlist.DataBind();
}
catch
(Exception ex)
{
System.Console.WriteLine(
"Exception: {0}"
, ex.ToString());
}
objConn.Close();
}
ERROR:
{"ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'SP_GET_EMPLOYEE_DETAIL'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored"}
Reply
Answers (
3
)
Get Only Single Value Error
Running console application written in C# via Task Scheduler