daily pastebin goal
38%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using (SqlCommand command = new SqlCommand(@"SELECT * FROM @table", connection))
  2.             {
  3.                 command.Parameters.AddWithValue("@table", table_name);
  4.                 using (SqlDataReader reader = command.ExecuteReader())
  5.                 {
  6.                     while (reader.Read())
  7.                         ...
  8.                 }
  9.             }
  10.      
  11. using (SqlCommand command = new SqlCommand(string.Format(@"SELECT * FROM {0}",table_name), connection))
  12.             {
  13.                 using (SqlDataReader reader = command.ExecuteReader())
  14.                 {
  15.                     while (reader.Read())
  16.                         ...
  17.                 }
  18.             }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top