TAILIEUCHUNG - Creating a Strongly Typed DataSet

[ Team LiB ] Recipe Creating a Strongly Typed DataSet Problem You want to create a strongly typed object wrapper around a DataSet. Solution Use one of the three techniques shown in the discussion to create a strongly typed DataSet using either the Visual Studio .NET IDE or a command line approach. | Team LiB Recipe Creating a Strongly Typed DataSet Problem You want to create a strongly typed object wrapper around a DataSet. Solution Use one of the three techniques shown in the discussion to create a strongly typed DataSet using either the Visual Studio .NET IDE or a command line approach. Discussion A strongly typed DataSet is a collection of classes that inherit from and extend the DataSet DataTable and DataRow classes and provide additional properties methods and events based on the DataSet schema. You can use all of the functionality in classes from which the strongly typed classes inherit in the same way as with untyped classes. A strongly typed DataSet class contains in addition to a single class extending the DataSet class three classes for each table in the DataSet extending each of the DataTable DataRow and DataRowChangeEvent classes. This recipe describes these classes and discusses their commonly used methods and properties. There is a class named TableNameDataTable for each table in the strongly typed DataSet. It has the base class DataTable. Table 2-1 lists commonly used methods of this class specific to the strongly typed DataSet. Table 2-1. TableNameDataTable methods Method Description AddTableNameRow Adds a row to the table. The method has two overloads one takes a TableNameRow object as the argument while the other takes a set of arguments containing the column values. FindByPrimaryKeyFieldl . PrimaryKeyFieldN Takes N arguments which are the values of the primary key fields of the row to find. Returns a TableNameRow object if found. NewTableNameRow Takes no arguments and returns a new TableNameRow object with the same schema as the table to be used for adding new rows to the table in the strongly typed DataSet. There is a class named TableNameRow for each table in the strongly typed DataSet. It has the base class DataRow and represents a row of data in the table. Table 2-2 lists commonly used properties and methods of this class specific .

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.