HelloPlz help me with this.Procedure or function ''sp_SqlImage'' expects parameter ''@ID'', which was not supplied. I have declared the parameter ID in Sql procedure also created in table.But i get this error plz helpMy code ispublic partial class TableAdd : System.Web.UI.Page { DataSet ds = new DataSet(); SqlConnection con; SqlCommand cmd = new SqlCommand(); SqlParameter sp1 = new SqlParameter(); SqlParameter sp2 = new SqlParameter(); SqlParameter sp3 = new SqlParameter(); SqlParameter sp4 = new SqlParameter(); SqlParameter sp5 = new SqlParameter(); SqlParameter sp6 = new SqlParameter(); }----------------------------------------------------------This is the add button on the page.:protected void Button1_Click(object sender, EventArgs e) { con = new SqlConnection("server=203.199.15.181; database= commonlogin;uid=sa;pwd=nirwan612"); //cmd.Parameters.Add("@ID", SqlDbType.BigInt).Value =Convert.ToInt32( txtID.Text); cmd.Parameters.Add("@Name", SqlDbType.VarChar).Value = txtName.Text; cmd.Parameters.Add("@Description", SqlDbType.VarChar).Value = txtDesc.Text; cmd.Parameters.Add("@Image", SqlDbType.Binary).Value = txtImage.Text; cmd.Parameters.Add("@Active", SqlDbType.VarChar).Value = txtActive.Text; cmd.Parameters.Add("@CreatedBy", SqlDbType.VarChar).Value = txtCreatedBy.Text; cmd.Parameters.Add("@CreatedDate", SqlDbType.DateTime).Value = txtCreDate.Text; cmd=new SqlCommand ("sp_SqlImage", con); cmd.CommandType =CommandType.StoredProcedure; con.Open(); cmd.ExecuteNonQuery (); con.Close(); }------------------------------------------------ 解决方案 这篇关于过程或函数"sp_SqlImage"需要未提供的参数"@ID".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-29 10:59