dotConnect Universal Documentation
Devart.Data.Universal Namespace / UniDataAdapter Class / FillSchema Method / FillSchema(DataSet,SchemaType) Method
The DataSet to be filled with the schema from the data source.
One of System.Data.SchemaType values. Specifies how to handle existing schema mappings.

In This Topic
    FillSchema(DataSet,SchemaType) Method
    In This Topic
    Configures the schema to match that in the data source.
    Syntax
    'Declaration
     
    Public Overloads Overrides Function FillSchema( _
       ByVal dataSet As DataSet, _
       ByVal schemaType As SchemaType _
    ) As DataTable()
    public override DataTable[] FillSchema( 
       DataSet dataSet,
       SchemaType schemaType
    )

    Parameters

    dataSet
    The DataSet to be filled with the schema from the data source.
    schemaType
    One of System.Data.SchemaType values. Specifies how to handle existing schema mappings.

    Return Value

    A DataTable object that contains schema information returned from the data source.
    Remarks

    Use this method when you need to retrieve structure of a table only, not the data.

    The Devart.Common.DbTable.FillSchema method retrieves the schema from the data source using the Devart.Common.DbTable.SelectCommand. The connection object associated with the Devart.Common.DbTable.SelectCommand must be valid, but it does not need to be open. If the connection is closed before FillSchema is called, it is opened to retrieve data, then closed. If the connection is open before Devart.Common.DbTable.FillSchema is called, it remains open.

    A Devart.Common.DbTable.FillSchema operation adds columns to the Devart.Common.DbTable.Columns collection of the Devart.Common.DbTable, and configures DataColumn properties if they exist at the data source. Devart.Common.DbTable.FillSchema also configures the Devart.Common.DbTable.PrimaryKey and Devart.Common.DbTable.Constraints properties.

    Devart.Common.DbTable.FillSchema does not return any rows. Use the Devart.Common.DbTable.Fill, Devart.Common.DbTable.FillPage, or Devart.Common.DbTable.Load methods to add rows to a Devart.Common.DbTable.

    For more detailed information, refer to topic System.Data.Common.DataAdapter.FillSchema.

    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