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

Lựa chọn và phân loại đối tượng DataRow: Visual Basic Lưu ý tập thể dục này sử dụng "Chương 4 VB" dự án mẫu và tiếp tục thực hiện trước trong chương này. 1. Mở xem mã nguồn đối với hình thức TableExaminer. Xác định vị trí các sự kiện ActCriteria_Click xử lý. thường xuyên thu thập này lựa chọn người dùng cung cấp và các biểu thức phân loại, sau đó sử dụng chúng để có được một bộ DataRow trường hợp từ một DataTable | 66 Microsoft 4 Step by Step Selecting and Sorting DataRow Objects Visual Basic Note This exercise uses the Chapter 4 VB sample project and continues the previous exercise in this chapter. 1. Open the source code view for the TableExaminer form. Locate the ActCriteria_Click event handler. This routine collects user-supplied selection and sorting expressions then uses them to obtain a set of DataRow instances from a DataTable. Most of the code exists to ensure that the user provides valid expressions. 2. Locate the statement just after the Apply the filter and sorting list comment. In the Try block add the following statement results This line performs the actual row selection returning the optionally sorted DataRow instances or an empty array when the selection expression doesn t match any of the table s rows. 3. Run the program. On the Lookup By Criteria tab provide expressions that will return a list of students with improving grades sorted by name. Enter ScoreTrimester3 ScoreTrimesterl OR ScoreTrimester3 ScoreTrimester2 in the Filter Criteria field and StudentName in the Sorting List field. Click Lookup. The matching rows appear in a separate window. Chapter 4 Accessing the Right Data Values 67 Performing Case-Sensitive Lookups The Select method ignores character casing by default when comparing string values. For instance the following expression will match joe Joe JOE or any other mixed-case variation on the name FirstName joe To enforce case-sensitive matches on all searches instead set the table s CaseSensitive property. C true Visual Basic True Using Expression Columns In Chapter 2 Building Tables of Data you learned how to add columns to a table that would each hold data values of a specific type. These static columns define the core data within a table. The DataTable class also supports expression columns fields that expose a .

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.