2009-07-02 62 views
0

这里是我的背后代码:过程或函数“usp_SendEmails”需要参数“@SchedId”,但未提供

protected void gvviewapproval_RowUpdated(object sender, GridViewUpdatedEventArgs e) 
    { 
     using (SqlConnection cn = new SqlConnection(Utilities.ConnectionString())) 
     { 
      using (SqlCommand cmd = new SqlCommand("usp_SendEmails", cn)) 
      { 
       cn.Open(); 
       cmd.CommandType = CommandType.StoredProcedure; 
       cmd.ExecuteNonQuery(); 
      } 
     } 

     gvviewapproval.DataBind(); 
    } 
} 
+0

我不认为该错误信息可能会更加明确。 – 2009-07-02 14:58:14

回答

2

您需要在执行前添加一个名为“@SchedId”的命令对象参数查询。

cmd.Parameters.AddWithValue("@SchedId", 3); 
相关问题