SqlConnection conn = new SqlConnection("Database=student;Server=.;user=sa;password=aaaaaaa"); conn.Open(); // Open the connection // body // body conn.Close(); // Close the connection