| {
conn.Close();
}
}
}
}
}
Summary
总结
SqlDataReader objects allow you to read data in a fast forward-only manner. You obtain data by reading each row from the data stream. Call the Close method of the SqlDataReader to ensure there are not any resource leaks.
SqlDataReader对象允许你以一种快速的只向前的方式读取数据。你从数据流中读取每一行来读取数据。调用SqlDataReader的Close方法保证资源泄漏不会发生。
I hope you enjoyed this lesson. The next one in this series is Lesson 05: Working with Disconnected Data - The DataSet and SqlDataAdapter.
For further questions, you are welcome to participate in the C# Station Discussion Forums.
Your feedback is very important and I appreciate any constructive contributions you have. Please feel free to contact me for feedback or comments you may have about this lesson.
<< 上一页 [11] [12] [13] [14] 下一页 |