getting the error when passing the parameter in store procedur
DataKeyNames="transactionId" OnRowDataBound="OnRowDataBound" Height="284px"
Width="713px">

passing for inside grid view
protected void OnRowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string customerId = grdOpen.DataKeys[e.Row.RowIndex].Value.ToString();
GridView gvOrders = e.Row.FindControl("grdOpendetails") as GridView;
objMain.transaction_Id =Convert.ToInt16(customerId);
DataSet ds = objMain.SelectOrderdev();
gvOrders.DataSource = ds;
gvOrders.DataBind();
}
}
and my sp code is
public DataSet SelectOrderdev()
{
SqlParameter[] parameter = new SqlParameter[1];
parameter[0] = new SqlParameter("@transactionId", transaction_Id);
DataSet dst = SQLDataAccess.ExecuteDataset(SQLDataAccess.ConnectionString, CommandType.StoredProcedure, "Sp_SelectOrderReportdev");
return dst;
}
getting the error
Procedure or function 'Sp_SelectOrderReportdev' expects parameter '@transactionId', which was not supplied.
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Ehsan SajjadPosted Jul 30, 2016, 9:18 AM