using (SqlConnection SqlConnection = new SqlConnection("..."))
{
using (SqlCommand SqlCommand = SqlConnection.CreateCommand())
{
SqlCommand.CommandText = "...";
SqlConnection.Open();
using (SqlDataReader SqlDataReader = SqlCommand.ExecuteReader())
{
while (SqlDataReader.Read())
{
//...
}
}
}
}
沒有留言:
張貼留言