TAILIEUCHUNG - Microsoft ADO .NET 4 Step by Step - p 18

Cùng chung những dòng này, phương pháp GetSchemaTable đối tượng SqlDataReader của DataTable trả về một ví dụ mô tả cấu trúc của các dữ liệu truy vấn. Bảng mới của nội dung bao gồm các cột như ColumnName, IsKey, và DataTypeName, cộng thêm khoảng hai chục hơn mà bạn có thể sử dụng để hiểu được trang điểm của dữ liệu gửi đến | 146 Microsoft 4 Step by Step Along those same generic lines the SqlDataReader object s GetSchemaTable method returns a DataTable instance that describes the structure of the queried data. The new table s content includes columns such as ColumnName IsKey and DataTypeName plus about two dozen more that you can use to understand the makeup of the incoming data. See the Visual Studio online help entry for Method for more information about this method. Processing More Complicated Results SQL Server supports returning multiple record sets in a single query. You can generate them by sending a batch of two or more semicolon-delimited SELECT statements within a single SqlCommand object s command text or by executing a stored procedure that generates multiple selections. When retrieving multiple record sets the returned SqlDataReader initially refers to the first set of records. To access the second set call the reader s NextResult method. The method returns False after it passes the final results set. Just as with the reader s view of individual data rows SqlDataReader cannot return to an earlier results set. Note The OLE DB and ODBC providers also support nested results where a single row might contain subordinate data rows. The SQL Server provider does not support nested sets. If you prefer to process the data returned from the query as XML use the SqlCommand object s ExecuteXmlReader method or the asynchronous BeginExecuteXmlReader and EndExecuteXmlReader methods which returns a instance. Your query must include the appropriate XML-specific keywords such as FOR XML or it must return valid XML content such as from a table field. Processing Database Queries C 1. Open the Chapter 9 CSharp project from the installed samples folder. The project includes a class named StateBuilder and a sealed class named General. 2. Open the code for the General class. This class centralizes much of the database .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.