Đang chuẩn bị liên kết để tải về tài liệu:
Microsoft SQL Server 2005 Developer’s Guide- Part 24

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Microsoft SQL Server 2005 Developer’s Guide- P24:SQL Server 2005 is a feature-rich release that provides a host of new tools and technologies for the database developer. This book is written to help database developers and DBAs become productive immediately with the new features and capabilities found in SQL Server 2005. | Chapter 6 Developing Database Applications with ADO.NET 209 The next point to notice is the use of the rdr SqlDataReader s GetSchemaTable method to actually retrieve the metadata for the query. The GetTableSchema method returns a DataTable object which is then bound to the DataGrid named grdResults using the grid s SetDataBinding method. NOTE ------- While this example illustrates retrieving the column metadata information from a single table the DataReader s GetTableSchema method works just as well with the results of multiple tables. Asynchronous Support Asynchronous query support is a feature that was present in ADO but was missing in the earlier releases of ADO.NET. Asynchronous queries provide client applications the ability to submit queries without blocking the user interference. The new ADO. NET asynchronous support provides the ability for server applications to issue multiple database requests on different threads without blocking the threads. With SQL Server 2005 ADO.NET provides asynchronous support for both opening a connection and executing commands. The asynchronous operation is started using the object s BEGINrrv method and is ended using the END.m method. The IAsyncResult object is used to check the completion status of the command. The following VB.NET code shows an asynchronous query to return all the rows of the Production.Product table from the AdventureWorks database Private Sub SQLAsync ByVal sServer As String Create the connection object Dim cn As New SqlConnection SERVER sServer _ INTEGRATED SECURITY True DATABASE AdventureWorks _ ASYNC True Dim cmd As New SqlCommand SELECT FROM Production.Product cn cmd.CommandType CommandType.Text Dim rdr As SqlDataReader Try Open the connection cn.Open Dim myResult As IAsyncResult cmd.BeginExecuteReader Do While myResult.IsCompleted True Perform other actions Loop Process the contents of the reader rdr cmd.EndExecuteReader myResult Open the reader 210 Microsoft SQL Server 2005 Developer s Guide rdr.Close

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.