How to Use StoreProcedure in FrontEnd Application

Saranya Boopathi
Posted by Saranya Boopathi under C# category on | Points: 40 | Views : 759
How to Use StoreProcedure in C#
SPlogin-SP Name
@Name-Parameter of SP

connectionstring();
SqlConnection con = new SqlConnection(str);
con.Open();
SqlCommand cmd = new SqlCommand("SPlogin", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@Name", SqlDbType.VarChar).Value = TextBox1.Text;
cmd.ExecuteNonQuery();
SqlDataAdapter da = new SqlDataAdapter(cmd);
con.Close();

Comments or Responses

Login to post response