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
SWAMY YT
1.1k
643
30.6k
Re Facing some issues.
Aug 4 2018 9:45 AM
dear sir,
1) while showing the gridview in select query i am getting error like.
("Procedure or function 'usp_ProjectLists' expects parameter '@intProjectid', which was not supplied")
but i am not passing any parameter to check the condition in store procedure.Please anyone help me out and suggest me whats the problem, here is my code and store procedure
if(@Event = 'Select')
begin
select * from [dbo].[Project_Lists]
order by Projectid desc
end
public void BindProjectData()
{
try
{
CreateConnection();
OpenConnection();
cmd.CommandText = "usp_ProjectLists";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@Event", "Select");
//cmd.Parameters.AddWithValue("@Projectid", Convert.ToInt32("Projectid")); // i am trying this line but no luck
sqladapter = new SqlDataAdapter(cmd);
dtSet = new DataSet();
sqladapter.Fill(dtSet);
GridViewProjectCRUD.DataSource = dtSet;
GridViewProjectCRUD.DataBind();
}
catch (Exception ex)
{
Response.Write("The Error is " + ex);
}
finally
{
CloseConnection();
DisposeConnection();
}
}
Reply
Answers (
1
)
which course is better to get the job ?
jqgrid custom pagination