dotConnect for Oracle Documentation
Devart.Data.Oracle Namespace / OracleDataSet Class
Members Example

In This Topic
    OracleDataSet Class
    In This Topic
    Represents an in-memory cache of data with support for Oracle-specific features.
    Syntax
    Remarks

    Refer to topic General Concepts in Database Application Development for information on how to use the OracleDataSet class best.

    This class supports cross-form data binding with the InterForm Technology.

    To migrate from a standard typed DataSet, change its Custom Tool property to dcOracleDataSetGenerator. You will also need to delete all TableAdapters from the old DataSet.

    Note: This class is not available in .NET Standard 1.3 compatible assembly. It is available only in the assembly for full .NET Framework and .NET Standard 2.0/2.1 compatible assemblies.

    This class is available only in Professional and Developer Editions. It is not available in Standard and Mobile Editions.

    Example
    This sample shows the use of untyped OracleDataSet with comprehensive OracleDataTables. You can do the same operations in design time by drag&drop-ing OracleDataSet from Toolbox to Form Designer and editting it via DataSet Manager and DataSet Editor. Otherwise, you can always generate typed OracleDataSet using DataSet Wizard.
    static OracleDataSet GetDataSet(string connStr) {
            // retrieving data from DEPT table
            OracleDataTable dept = new OracleDataTable("select * from dept", connStr);
            dept.FetchAll = true;
            dept.Active = true;
          
            // retrieving data from EMP table
            OracleDataTable emp = new OracleDataTable("select * from emp", connStr);
            emp.FetchAll = true;
            emp.Active = true;
    
            // adding data tables to OracleDataSet
            OracleDataSet dataSet = new OracleDataSet();
            dataSet.Tables.Add(dept);
            dataSet.Tables.Add(emp);
    
            // linking tables to allow navigation from parent table rows
            // to corresponding child table rows
            DataColumn parentColumn = dataSet.Tables["DEPT"].Columns["DEPTNO"];
            DataColumn childColumn = dataSet.Tables["EMP"].Columns["DEPTNO"];
            DataRelation relation = new System.Data.DataRelation("DeptsEmps", parentColumn, childColumn);
            dataSet.Relations.Add(relation);
    
            return dataSet;
    }
    Public Function GetDataSet(ByVal connStr As String) As OracleDataSet
            ' retrieving data from DEPT table
            Dim dept As New OracleDataTable("select * from dept", connStr)
            dept.FetchAll = True
            dept.Active = True
    
            ' retrieving data from EMP table
            Dim emp As New OracleDataTable("select * from emp", connStr)
            emp.FetchAll = True
            emp.Active = True
    
            ' adding data tables to OracleDataSet
            Dim dataSet As New OracleDataSet()
            dataSet.Tables.Add(dept)
            dataSet.Tables.Add(emp)
    
            ' linking tables to allow navigation from parent table rows
            ' to corresponding child table rows
            Dim parentColumn As DataColumn = dataSet.Tables("DEPT").Columns("DEPTNO")
            Dim childColumn As DataColumn = dataSet.Tables("EMP").Columns("DEPTNO")
            Dim relation As New System.Data.DataRelation("DeptsEmps", parentColumn, childColumn)
            dataSet.Relations.Add(relation)
            Return dataSet
    End Function
    Inheritance Hierarchy

    System.Object
       System.ComponentModel.MarshalByValueComponent
          System.Data.DataSet
             Devart.Common.DbDataSet
                Devart.Data.Oracle.OracleDataSet

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also