but i m following the tutorial.when i m using the executenonquery,it gives the "int " error as u said.and when i m using ExecuteReader before sqlparamerters,as in tutorial,it gives error"Procedure 'ShowSuppliers' expects parameter '@txt', which was not supplied." protected void Page_Load(object sender, EventArgs e) { SqlConnection con= new SqlConnection("Data Source=n-6e9a4f688df44;Initial Catalog=Northwind;Integrated Security=True"); con.Open(); SqlCommand com = new SqlCommand("ShowSuppliers", con); com.CommandType = CommandType.StoredProcedure; SqlDataReader reader = com.ExecuteReader(); SqlParameter parm = com.Parameters.Add("@txt", SqlDbType.VarChar, 50); parm.Direction = ParameterDirection.Input; parm.Value = "UK"; while (reader.Read()== true) { Response.Write(reader[0].ToString() + "
"); } reader.Close(); con.Close(); } .and when i used ExecuteReader after sqlparameter it shows nothing on output protected void Page_Load(object sender, EventArgs e) { SqlConnection con= new SqlConnection("Data Source=n-6e9a4f688df44;Initial Catalog=Northwind;Integrated Security=True"); con.Open(); SqlCommand com = new SqlCommand("ShowSuppliers", con); com.CommandType = CommandType.StoredProcedure; SqlDataReader reader = com.ExecuteReader(); SqlParameter parm = com.Parameters.Add("@txt", SqlDbType.VarChar, 50); parm.Direction = ParameterDirection.Input; parm.Value = "UK"; //SqlDataReader reader = com.ExecuteNonQuery(); //SqlDataReader reader = com.ExecuteReader(); while (reader.Read()== true) { Response.Write(reader[0].ToString() + "
"); } reader.Close(); con.Close(); } n for procedure i want to create a procedure then y its changed to Alter.i dont want edit any value. kindly check the tutorial.
Chohan