Guest User

Untitled

a guest
Jul 1st, 2012
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. Most efficient way to run several SQL statements
  2. using(SqlCommand cmd = conn.CreateCommand())
  3. {
  4. cmd.CommandType = CommandType.Text;
  5. cmd.CommandText = @"
  6. exec YourProcedure @param1;
  7. exec YourProcedure @param2;
  8. exec YourProcedure @param3;";
  9.  
  10. cmd.ExecuteNonQuery();
  11. }
Advertisement
Add Comment
Please, Sign In to add comment