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

Chương này giới thiệu hai tính năng nâng cao chức năng cốt lõi của nó: tập hợp và xem dữ liệu. hỗ trợ các đối tượng DataTable bảy tập hợp riêng biệt cho phép bạn tạo ra một giá trị dựa trên kết quả tính toán từ một cột trong bảng duy nhất. Mỗi bảy chức năng-Sum, Trung bình, Min, Max, Count, STDEV, và Var-có thể được sử dụng một cách độc lập để tính toán tổng giá trị của một cột | 106 Microsoft 4 Step by Step Summary This chapter introduced two features that enhance its core functionality aggregates and data views. DataTable objects support seven distinct aggregates that let you generate a single value based on computing results from a single table column. Each of these seven functions Sum Avg Min Max Count StDev and Var can be used in a standalone manner to calculate a single column s aggregate value. They can also be expressed through a table column allowing for grouped summaries. The DataView class rolls up sorting and filtering rules for a table in a single object that in some cases can be used much like the underlying DataTable. Containing no data the DataView includes an indexed reference to each row in the linked DataTable. Changes made to the view are reflected in the table and vice versa. Even more important views allow you to have two unique expressions of a single table available at the same time. Chapter 6 Quick Reference To Do This Calculate the average of a column of data Create a DataTable with valid columns and rows. Create a string containing the expression Avg xxx where xxx is the name of the column to average. Call the DataTable object s Compute method passing it the string expression. Find the maximum value of a child-table column associated with each row in a parent table Create parent and child DataTable objects. Add the tables to a DataSet instance. Link the tables with a DataRelation object. Create a string containing the expression Child. Max xxx where xxx is the name of the child-table column in which to locate the maximum value. Create a new DataColumn of the same data type as the examined child column. Set the DataColumn object s Expression property to the string expression. Add the DataColumn to the parent DataTable. Generate a DataTable from a DataView Create the original DataTable. Create a new DataView instance passing the DataTable object to its constructor. Set the DataView object s RowFilter

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.