Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <connectionStrings>
- <add name="connectionStringName"
- connectionString="Data Source=NAMESQLEXPRESS;Initial Catalog=DbName;Integrated Security=True"
- providerName="System.Data.SqlClient" />
- SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["connectionStringName"].ConnectionString);
- SqlCommand cmd;
- con.Open();
- cmd = new SqlCommand("proc_name", con);
- cmd.CommandType = CommandType.StoredProcedure;
- cmd.Parameters.Add(new SqlParameter("@id", id));
- cmd.ExecuteReader();
- con.Close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement