Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Quản trị mạng
Resolving Data Conflicts
Đang chuẩn bị liên kết để tải về tài liệu:
Resolving Data Conflicts
Tuấn Tài
56
8
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
[ Team LiB ] Recipe 6.11 Resolving Data Conflicts Problem You need to effectively resolve data conflicts and prevent overwriting of existing data when attempting to update changes in a DataSet to a database where the underlying data has changed. | Team LiB Recipe 6.11 Resolving Data Conflicts Problem You need to effectively resolve data conflicts and prevent overwriting of existing data when attempting to update changes in a DataSet to a database where the underlying data has changed. Solution Handle the DBConcurrencyException within the RowUpdated event of the DataAdapter. The schema of table TBL0611 used in this solution is shown in Table 6-13. Table 6-13. TBL0611 schema Column name Data type Length Allow nulls Id int 4 No Field1 nvarchar 50 Yes The sample code contains seven event handlers Form.Load Creates a DataSet A containing a single DataTable A filling the schema and data for the table from TBL0611 from the database using a DataAdapter. The ContinueUpdateOnError property of the DataAdapter is set to true. A CommandBuilder object is created to generate the updating logic for the DataAdapter. The default view of DataTable A is bound to a data grid on the form. A conflict table is created to store the original row data for a row when a concurrency error is encountered while updating a row from DataTable A back to TBL0611 in the database. A DataAdapter that uses a parameterized SQL SELECT statement to retrieve the original row data is created. The schema for the conflict table is loaded from TBL0611 using the DataAdapter. The default view of the conflict table is bound to a data grid on the form. A DataSet B and a conflict table for DataTable B row update concurrency errors are created in the same way as described for DataSet A. Refresh A Button.Click Clears the conflict table clears the data in table A and uses a DataAdapter to fill table A from TBL0611 in the database. Refresh B Button.Click Clears the conflict table clears the data in table B and uses a DataAdapter to fill table B from TBL0611 in the database. Update A Button.Click Clears the conflict table and uses a DataAdapter to update changes made to table A back to table TBL0611 in the database. Update B Button.Click Clears the conflict table
TÀI LIỆU LIÊN QUAN
Ebook Spectrum Techniques - Lab Manual Teacher’s Version
Illumina error profiles: Resolving fine-scale variation in metagenomic sequencing data
Resolving Data Conflicts
crossorigin="anonymous">
Đã 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.