Guest User

Untitled

a guest
Jun 24th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. try {
  2. conn.Open();
  3. // Perform query here
  4. } finally {
  5. conn.Close();
  6. }
  7.  
  8. connection.Open();
  9. cmd.ExecuteReader(); // or any other form of getting the data
  10. cmd2.ExecuteReader();
  11. .
  12. .
  13. .
  14. .
  15. connection.Close();
  16.  
  17. using (SqlConnection connection =
  18. new SqlConnection(connectionString)
  19. {
  20. connection.Open();
  21. //issue command
  22. }
Add Comment
Please, Sign In to add comment