Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Session 8 Bai 8 ve winform


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Session 8 Bai 8 ve winform

  1. 1. Session 8 Slide 1 of 1309/20/13 Data Classes
  2. 2. Slide 2 of 2609/20/13 Module Introduction
  3. 3. Slide 3 of 2609/20/13 "DataAdapter" Class DataAdapter class forms the base class for all data adapters. ADO.NET implements various data adapters. These data adapters are inherited from the DbDataAdapter class. "SqlDataAdapter" Class The SqlDataAdapter serves as a link between a DataSet and the SQL Server database for retrieving and saving data. The SqlDataAdapter class exists in the System.Data.SqlClient namespace.
  4. 4. Slide 4 of 2609/20/13
  5. 5. Slide 5 of 2609/20/13 "SqlDataReader" Class The SqlDataReader class is used to read data from a SQL Server database. It exists in the System.Data.SqlClient namespace. For retrieving data from the database: + First connect to SQL Server database using SqlConnection. + Call the ExecuteReader() method of the SqlCommand class to retrieve records from the database. + Read the records by executing the Read() method.
  6. 6. Slide 6 of 2609/20/13
  7. 7. Slide 7 of 2609/20/13 DataSet
  8. 8. Slide 8 of 2609/20/13
  9. 9. Slide 9 of 2609/20/13 Typed Datasets DataSet object can either be typed or untyped. A typed DataSet is a class derived from the DataSet class.
  10. 10. Slide 10 of 2609/20/13 UnTyped Datasets An untyped dataset does not have a built-in schema
  11. 11. Slide 11 of 2609/20/13 Fetching XML Data Using Datasets DataSet objects can fetch data from an XML file. + ReadXml() method contains the path of the XML file. This method reads the XML data including the schema of the XML file. + Can make changes to the XML data in the DataSet and update the changes to the XML source file using the WriteXml() method.
  12. 12. Slide 12 of 2609/20/13 Navigating Records
  13. 13. Slide 13 of 2609/20/13 "DataTable" Class A DataTable class represents a table in the DataSet. It is used to store data from a data source. It contains a set of rows and columns to organize data in a tabular format.
  14. 14. Slide 14 of 2609/20/13 "DataTableCollection" Class The DataTableCollection class is a collection of tables for a DataSet. It enables you to access the collection of DataTable objects and navigate through the tables in the DataSet.
  15. 15. Slide 15 of 2609/20/13
  16. 16. Slide 16 of 2609/20/13 Setting Relation between Tables
  17. 17. Slide 17 of 2609/20/13 "DataColumn" Class The DataColumn class represents a column in a DataTable.
  18. 18. Slide 18 of 2609/20/13 "DataRow" Class The DataRow class represents a row in a DataTable.
  19. 19. Slide 19 of 2609/20/13 "DataTableReader" Class