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

Đôi khi nó không phải là thuận tiện hoặc thậm chí có thể sử dụng cùng một bảng và tên cột giữa DataTable địa phương và cơ sở dữ liệu xem bảng bên ngoài, hoặc kết quả tạo ra nó đại diện. | 186 Microsoft 4 Step by Step Table and Column Mapping Sometimes it isn t convenient or even possible to use the same table and column names between your local DataTable and the external database table view or generated results it represents. In such situations use the collection to define the naming changes between the external and internal versions of your table structures. This system is especially useful when importing data into a DataSet in which named tables already exist. Remember that when SqlDataAdapter retrieves result sets from the database it names the first set Table the second set Tablel and so on. For example suppose you use the DataSet String syntax in the Fill method targetSet Grid Visual Basic version The first table in targetSet is Grid the second is Gridl and so on. If the DataSet includes names that vary from these defaults Fill will add new tables with the default names and schemas. To coerce the data adapter into moving the incoming records into the correct table add new objects to the table mapping collection before calling the Fill method. C ---- Using the basic external-internal syntax is quick. Table Employee ---- Adding a DataTableMapping instance works also. DataTableMapping nameChange new DataTableMapping Tablel Customer nameChange Visual Basic ----- Using the basic external-internal syntax is quick. Table Employee ----- Adding a DataTableMapping instance works also. Dim nameChange As New DataTableMapping Tablel Customer nameChange Chapter 11 Making External Data Available Locally 187 It s not just table names that can be mapped the data adapter supports column name mappings as well. C ----- Start with the table name. DataTableMapping .

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.