Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- conn.Open();
- // Perform query here
- } finally {
- conn.Close();
- }
- connection.Open();
- cmd.ExecuteReader(); // or any other form of getting the data
- cmd2.ExecuteReader();
- .
- .
- .
- .
- connection.Close();
- using (SqlConnection connection =
- new SqlConnection(connectionString)
- {
- connection.Open();
- //issue command
- }
Add Comment
Please, Sign In to add comment