Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Programming » SQL Anywhere .NET 2.0 API Reference » SADataReader class

GetOrdinal method Next Page

GetSchemaTable method


Returns a DataTable that describes the column metadata of the SADataReader.

Syntax

Visual Basic

Public Overrides Function GetSchemaTable() As DataTable

C#

public override DataTable GetSchemaTable();

Return value

A DataTable that describes the column metadata.

Remarks

This method returns metadata about each column in the following order:

DataTable column Description
ColumnNameThe name of the column or a null reference (Nothing in Visual Basic) if the column has no name. If the column is aliased in the SQL query, the alias is returned. Note that in result sets, not all columns have names and not all column names are unique.
ColumnOrdinalThe ID of the column. The value is in the range [0, FieldCount -1].
ColumnSizeFor sized columns, the maximum length of a value in the column. For other columns, this is the size in bytes of the data type.
NumericPrecisionThe precision of a numeric column or DBNull if the column is not numeric.
NumericScaleThe scale of a numeric column or DBNull if the column is not numeric.
IsUniqueTrue if the column is a non-computed unique column in the table (BaseTableName) it is taken from.
IsKeyTrue if the column is one of a set of columns in the result set that taken together from a unique key for the result set. The set of columns with IsKey set to true does not need to be the minimal set that uniquely identifies a row in the result set.
BaseServerNameThe name of the SQL Anywhere database server used by the SADataReader.
BaseCatalogNameThe name of the catalog in the database that contains the column. This value is always DBNull.
BaseColumnNameThe original name of the column in the table BaseTableName of the database or DBNull if the column is computed or if this information cannot be determined.
BaseSchemaNameThe name of the schema in the database that contains the column.
BaseTableNameThe name of the table in the database that contains the column, or DBNull if column is computed or if this information cannot be determined.
DataTypeThe .NET data type that is most appropriate for this type of column.
AllowDBNullTrue if the column is nullable, false if the column is not nullable or if this information cannot be determined.
ProviderTypeThe type of the column.
IsAliasedTrue if the column name is an alias, false if it is not an alias.
IsExpression True if the column is an expression, false if it is a column value.
IsIdentityTrue if the column is an identity column, false if it is not an identity column.
IsAutoIncrementTrue if the column is an autoincrement or global autoincrement column, false otherwise (or if this information cannot be determined).
IsRowVersionTrue if the column contains a persistent row identifier that cannot be written to, and has no meaningful value except to identify the row.
IsHiddenTrue if the column is hidden, false otherwise.
IsLongTrue if the column is a long varchar, long nvarchar, or a long binary column, false otherwise.
IsReadOnlyTrue if the column is read-only, false if the column is modifiable or if its access cannot be determined.

For more information about these columns, see the .NET Framework documentation for SqlDataReader.GetSchemaTable.

For more information, see Obtaining DataReader schema information.

See also