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.
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.
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