OracleDataReader.GetSchemaTable Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a DataTable that describes the column metadata of the OracleDataReader.
public:
virtual System::Data::DataTable ^ GetSchemaTable();
public:
override System::Data::DataTable ^ GetSchemaTable();
public System.Data.DataTable GetSchemaTable ();
public override System.Data.DataTable GetSchemaTable ();
abstract member GetSchemaTable : unit -> System.Data.DataTable
override this.GetSchemaTable : unit -> System.Data.DataTable
override this.GetSchemaTable : unit -> System.Data.DataTable
Public Function GetSchemaTable () As DataTable
Public Overrides Function GetSchemaTable () As DataTable
A DataTable that describes the column metadata.
The GetSchemaTable method returns metadata about each column in the following order:
DataReader Column | Description |
---|---|
ColumnName | The name of the column; this might not be unique. If the column name cannot be determined, a null value is returned. This name always reflects the most recent naming of the column in the current view or command text. |
ColumnOrdinal | The zero-based ordinal of the column. This column cannot contain a null value. |
ColumnSize | The maximum possible length of a value in the column. For columns that use a fixed-length data type, this is the size of the data type. |
NumericPrecision | If DbType is a numeric data type, this is the maximum precision of the column. The precision depends on the definition of the column. Float and Double data types in Oracle are binary precision. |
NumericScale | If DbType is a numeric data type, the number of digits to the right of the decimal point. Float and Double data types in Oracle are binary scale. |
DataType | Maps to the common language runtime type of DbType. |
IsLong | true if the column contains a Binary Long Object (BLOB) that contains very long data. |
AllowDBNull | true if the consumer can set the column to a null value; otherwise, false . A column may contain null values, even if it cannot be set to a null value. |
IsUnique | true : No two rows in the base table-the table returned in BaseTableName -can have the same value in this column. IsUnique is guaranteed to be true if the column constitutes a key by itself or if there is a constraint of type UNIQUE that applies only to this column. false : The column can contain duplicate values in the base table. The default for this column is false. |
IsKey | true : The column is one of a set of columns in the rowset that, taken together, uniquely identify the row. The set of columns with IsKey set to true must uniquely identify a row in the rowset. There is no requirement that this set of columns is a minimal set of columns. This set of columns may be generated from a base table primary key, a unique constraint or a unique index. false : The column is not required to uniquely identify the row. |
BaseTableName | The name of the table or view in the data store that contains the column. A null value if the base table name cannot be determined. The default of this column is a null value. |
BaseColumnName | The name of the column in the data store. This might be different than the column name returned in the ColumnName column if an alias was used. A null value if the base column name cannot be determined or if the rowset column is derived, but not identical to, a column in the data store. The default for this column is a null value. |
BaseSchemaName | The name of the schema in the data store that contains the column. A null value if the base schema name cannot be determined. The default for this column is a null value. |
A row is returned for every column in the results set.
הערה
To ensure that metadata columns return the correct information, you must call ExecuteReader with the behavior
parameter set to KeyInfo
. Otherwise, some of the columns in the schema table may return default, null, or incorrect data.
מוצר | גירסאות |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
משוב של .NET
.NET הוא פרויקט קוד פתוח. בחר קישור כדי לספק משוב: