| 1 | using (SqlConnection SqlConnection = new SqlConnection("...")) |
| 2 | { |
| 3 | using (SqlCommand SqlCommand = SqlConnection.CreateCommand()) |
| 4 | { |
| 5 | SqlCommand.CommandText = "..."; |
| 6 | |
| 7 | SqlConnection.Open(); |
| 8 | |
| 9 | using (SqlDataReader SqlDataReader = SqlCommand.ExecuteReader()) |
| 10 | { |
| 11 | while (SqlDataReader.Read()) |
| 12 | { |
| 13 | //... |
| 14 | } |
| 15 | } |
| 16 | } |
| 17 | } |
沒有留言:
張貼留言