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
Ankit Kumar
NA
159
48.3k
Output Parameter is not returning value
Sep 5 2017 8:25 AM
Hello friends,
My stored is not returning any value in output parameter, Code is given below.
try
{
//Declaring parameter
SqlParameter[] parameter = new SqlParameter[2];
//name and type declaration of the table variable to be passed as parameter
parameter[0] = new SqlParameter("@EmpDetails",dt);
parameter[0].Direction = ParameterDirection.Input;
parameter[0].SqlDbType = SqlDbType.Structured;
parameter[1] = new SqlParameter();
parameter[1].ParameterName = "@errormessage";
parameter[1].Direction = ParameterDirection.Output;
parameter[1].SqlDbType = SqlDbType.VarChar;
parameter[1].Size = 1000;
//invoking stored procedure ImportEmployee
SqlHelper.ExecuteNonQuery(connectsql, CommandType.StoredProcedure, "sp_importemployee", parameter);
if (parameter[1].Value.ToString() != "")
{
Errors=(parameter[1].Value.ToString());
}
}
catch (Exception ex)
{
Errors=ex.Message.ToString();
}
Any quick help will be very much appreciable
Reply
Answers (
8
)
Install .IPA file in iphone.................
mail not firing from windows application tool