GetSchemaTable() Method
Syntax:
public DataTable GetSchemaTable()
Description:
Returns a DataTable that describes the column metadata of the data reader.
The resulting table has a row for each column in the result set. The following columns are present.
ColumnName | The name of the column in the result set. |
ColumnOrdinal | The ordinal position of the column in the result set. |
ColumnSize | The size of the column in the result set. |
NumericPrecision | The precision for numeric types of the column in the result set. |
NumericScale | The scale for numeric types of the column in the result set. |
DataType | The data type of the column in the result set. |
ProviderType | The provider specific data type of the column in the result set. |
IsLong | True if the column in the result set is a BLOB, CLOB or WCLOB |
AllowDBNull | True if the column in the result set allows NULL values. |
IsReadOnly | True if the column in the result set is read-only. |
IsRowVersion | True if the column in the result set contains row version information. |
IsUnique | True if the column in the result set is involved in a uniqueness constraint. |
IsKey | True if the column in the result set is involved in a key. |
IsAutoIncrement | True if the column in the result set is an auto-increment column. |
BaseSchemaName | The name of the database the column in the result set comes from. |
BaseTableName | The name of the table the column in the result set comes from. |
BaseColumnName | The base name of the column in the result set. |
Return Value:
Type: System.Data.DataTable
A DataTable that describes the column metadata.
Exceptions:
Exception | Condition |
---|---|
InvalidOperationException | The RdmDataReader is closed. |
Reference:
For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetSchemaTable