Đang chuẩn bị liên kết để tải về tài liệu:
Modifying Data Using a Strongly Typed DataSet

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Modifying Data Using a Strongly Typed DataSet In Chapter 10, you saw how to create and use a strongly typed DataSet class named MyDataSet. You can use objects of this class to represent the Customers table and rows from that table | Modifying Data Using a Strongly Typed DataSet In Chapter 10 you saw how to create and use a strongly typed DataSet class named MyDataSet. You can use objects of this class to represent the Customers table and rows from that table. In this section you ll see how to modify data using a strongly typed object of the MyDataSet class. Note One of the features of a strongly typed DataSet object allows you to read a column value using a property with the same name as the column. For example to read the CustomerlD of a column you can use myDataRow.CustomerlD rather than myDataRow CustomerID . See Chapter 10 for more details on reading column values. The following methods in the MyDataSet class allow you to modify the rows stored in a MyDataSet object NewCustomersRow AddCustomersRow and RemoveCustomersRow . You can find a row using the FindByCustomerID method. You can check if a column value contains a null value using methods such as IsContactNameNull and you can set a column to null using methods such as SetContactNameNull . You ll see these methods used shortly. Note You ll find a completed VS .NET example project for this section in the StronglyTypedDataSet2 directory. You can open this project in VS .NET by selecting File Open Project and opening the WindowsApplication4.csproj file. You ll need to change the ConnectionString property of the sqlConnection1 object to connect to your Northwind database. The Form1_Load method of the form in the example project shows how to add modify and remove a row to a strongly typed DataSet object named myDataSetl. You can see the steps that accomplish these tasks in the following Form1_Load method private void Form1_Load object sender System.EventArgs e populate the DataSet with the CustomerlD CompanyName and Address columns from the Customers table sqlConnection1.Open sqlDataAdapter1.Fill myDataSet1 Customers get the Customers DataTable MyDataSet.CustomersDataTable myDataTable myDataSet1.Customers II create a new DataRow in .

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.