In ADO.NET dataset browse multiple related tables (1) Author: Microsoft www.ASPCool.com Time: 2003-1-23 13:48:24 Views: 13475
Summary: The data set in ADO.NET is a method of representing data in memory, which can contain multiple related data tables. This article describes how to browse these related data tables in a data set. You will create a Windows® application in Visual Basic® .NET or Visual C #TM .NET, return the relevant record based on the selected record, and use the expression as a related record to generate a total information. This article contains some links to English sites. Introduction Since the data set can contain several related tables, it is understood that browsing between parent records and subcords is a basic task, which is not obvious, especially when you try to access the deep table in the related hierarchy. This is even more. You will also learn how to browse the dataset containing a multi-to-many table, each of which is associated with each other by a third party table (intermediate table). The following is an overview of the tasks included in this article: Create a Windows application project. Displays a list of data used as an initial selected content. Returns a record related to selected records. Browse multiple tables and multiple related structures, and directly access the data in the data set at runtime. In addition, this article also describes some related tasks: adding the relevant data-based expression columns for the data table. Generate a total information of related data. Prerequisites To fully understand this article, you should have the knowledge of the basic relational database concept. Connect with the Rose Document Database to you can create and run your application. Most familiar with the ADO.NET data set. Important data objects To use relevant records in the data set, you should basically understand several objects in the .NET Framework System.Data namespace and how they interact. These objects work together to provide navigation features in the data set. The following objects are used to express relationships in the data set: DataSet - represents data in memory, which can contain multiple DataTable objects associated with DataRelation objects. DataTable - Represents a complete data sheet. The architecture of the data sheet is defined by the DatacolumnCollection constituting the table. When two data tables are related, the DataRelelation object uses data using Datacolumn in each table. DataRelation - Connect multiple tables to browse records in the relevant table. DataRelelation objects are passed to getChildRows or getParentrow methods when accessing related records. The DataRelation object determines the related tables to be queried to return related data associated with getChildrow or getPareNTrow method. DATAROW - A separate record indicating the data. The getChildRows method for returning the relevant data and the getParenTrow method is a member of the DataRow object. Datacolumn - Represents a separate field that will define the DataTable architecture when it is combined. When two data tables are related, the DataRelelation object uses data using the data columns in each table.