TAILIEUCHUNG - Reading a Column Value Using Strongly Typed DataSet Classes

Reading a Column Value Using Strongly Typed DataSet Classes A strongly typed DataSet object allows you read a column value using a property with the same name as the column. | Reading a Column Value Using Strongly Typed DataSet Classes A strongly typed DataSet object allows you read a column value using a property with the same name as the column. For example to read the CustomerID of a column you can use rather than myDataRow CustomerID . This is a nice feature because the compiler can then catch any errors in column spellings at compile time rather than runtime. For example if you incorrectly spelled CustomerID as CustimerID then the mistake would be caught by the compiler. Another feature of a strongly typed DataSet is that when you work with it in VS .NET IntelliSense automatically pops up the properties and methods of the DataSet when you are typing. You can then pick the property or method from the list rather than have to type it all in. The downside to using a strongly typed DataSet is that you must do some initial work to generate it before you can use it. If the columns in your database tables don t change very often then you should consider using strongly typed DataSet objects. On the other hand if your database tables change a lot you should probably avoid them because you ll need to regenerate the strongly typed DataSet to keep it synchronized with the definition of the database table. Note You ll find a completed VS .NET example project for this section in the StronglyTypedDataSet directory. You can open this project in VS .NET by selecting File Open Project and opening the file. You ll need to change the ConnectionString property of the sqlConnection1 object to connect to your SQL Server Northwind database. You can also follow along with the instructions in this section by copying the DataReader directory to another directory and using that project as your starting point. Creating a Strongly Typed DataSet Class In this section you ll create a strongly typed DataSet class that is used to access the Customers table. If you re following along with these instructions open the .

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.