Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Tài liệu đang bị lỗi
File tài liệu này hiện đang bị hỏng, chúng tôi đang cố gắng khắc phục.
Tài liệu Improving Paging Performance pdf
Nội dung xem thử
Mô tả chi tiết
[ Team LiB ]
Recipe 9.4 Improving Paging Performance
Problem
Given an application that allows the user to page through a large result set in a data grid,
you need to improve the performance of the paging.
Solution
Build a custom paging solution that overcomes the performance limitations of the
overloaded Fill( ) method of the DataAdapter.
The sample uses a single stored procedure, which is shown in Example 9-5:
SP0904_PageOrders
Used to return 10 records from the Orders table of the Northwind database that
correspond the first, last, next, or previous page, or a specific page. The procedure
has the following arguments:
@PageCommand
An input parameter that accepts one of the following values: FIRST, LAST,
PREVIOUS, NEXT, or GOTO. This specifies the page of results to return to the
client.
@First OrderId
An input parameter that contains the OrderID of the first record of the client's
current page of Orders data.
@Last OrderId
An input parameter that contains the OrderID of the last record of the client's
current page of Orders data.
@PageCount
An output parameter that returns the number of pages, each of which contains 10
records, in the result set.
@CurrentPage