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

Các điều khoản trong một truy vấn, và cuối cùng LINQ các phương pháp khuyến nông và các biểu thức lambda tạo nên một biểu thức LINQ cây chuyển thành các câu lệnh SQL và những điều khoản chỉ được phát hiện trên máy chủ dữ liệu | 26 Microsoft 4 Step by Step 3. Open the source code view for the TableDetails form. Locate the TableDetails_Load routine. Just below the comment Add the columns to the display list add the following statements to access individual columns of the DataTable foreach DataColumn oneColumn in oneColumn if 0 No columns available 4. Locate the AllColumns_DrawItem event handler. Just below the comment Extract the column details add the following statements to access members of the DataColumn columnName dataTypeName isPrimaryKey null itemDetail true 5. Run the application. When the switchboard appears click the Show Table with Columns button. The TableDetails form opens with a structural view of the table and its column details. Adding Columns to a DataTable Visual Basic Note This exercise uses the Chapter 2 VB sample project and continues the previous exercise in this chapter. 1. Open the source code view for the Switchboard form. Locate the GetColumnTable function. This routine already contains a single statement. Return Nothing 2. Replace that line with the following statements to create a new DataTable with columns and a primary key ---- Return a table that has columns. Dim theTable As New DataTable Customer Chapter 2 Building Tables of Data 27 ---- Add some basic columns. ID GetType Long FullName GetType String LastOrderDate GetType Date ---- Create a primary key for the table. ID ---- Finished. Return theTable 3. Open the source code view for the TableDetails form. Locate the TableDetails_Load routine. Just below the comment that says Add the columns to the display list add the following statements to access individual columns of the DataTable For Each .

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.