DbColumn 类

定义

表示数据源中的列。Represents a column within a data source.

public ref class DbColumn abstract
public abstract class DbColumn
type DbColumn = class
Public MustInherit Class DbColumn
继承
DbColumn

构造函数

DbColumn()

初始化 DbColumn 类的新实例。Initializes a new instance of the DbColumn class.

属性

AllowDBNull

获取可为 null 的布尔值,该值指示此列中是否允许 DBNull 值,或者在未设置任何值时返回 nullGets a nullable boolean value that indicates whether DBNull values are allowed in this column, or returns null if no value is set. 在派生类中重写时,可设置为 truefalse,指示此列中是否允许 DBNull 值,也可设置为 null(在 Visual Basic 中为 Nothing)。Can be set to either true or false indicating whether DBNull values are allowed in this column, or null (Nothing in Visual Basic) when overridden in a derived class.

BaseCatalogName

获取与数据源关联的目录;否则,如果未设置任何值,则为 nullGets the catalog name associated with the data source; otherwise, null if no value is set. 在派生类中重写时,可设置为目录名称或 nullCan be set to either the catalog name or null when overridden in a derived class.

BaseColumnName

获取列名称;否则,如果未设置任何值,则为 nullGets the base column name; otherwise, null if no value is set. 在派生类中重写时,可设置为列名称或 nullCan be set to either the column name or null when overridden in a derived class.

BaseSchemaName

获取与数据源关联的架构;否则,如果未设置任何值,则为 nullGets the schema name associated with the data source; otherwise, null if no value is set. 在派生类中重写时,可设置为架构名称或 nullCan be set to either the schema name or null when overridden in a derived class.

BaseServerName

获取与列关联的服务器名称;否则,如果未设置任何值,则为 nullGets the server name associated with the column; otherwise, null if no value is set. 在派生类中重写时,可设置为服务器名称或 nullCan be set to either the server name or null when overridden in a derived class.

BaseTableName

获取架构中的表名称;否则,如果未设置任何值,则为 nullGets the table name in the schema; otherwise, null if no value is set. 在派生类中重写时,可设置为表名称或 nullCan be set to either the table name or null when overridden in a derived class.

ColumnName

获取列的名称。Gets the name of the column. 在派生类中重写时,可设置为列名称。Can be set to the column name when overridden in a derived class.

ColumnOrdinal

获取数据源行中的列位置(序号);否则,如果未设置任何值,则为 nullGets the column position (ordinal) in the datasource row; otherwise, null if no value is set. 在派生类中重写时,可设置为 int32 值(用于指定列位置)或 nullCan be set to either an int32 value to specify the column position or null when overridden in a derived class.

ColumnSize

获取列大小;否则,如果未设置任何值,则为 nullGets the column size; otherwise, null if no value is set. 在派生类中重写时,可设置为 int32 值(用于指定列大小)或 nullCan be set to either an int32 value to specify the column size or null when overridden in a derived class.

DataType

获取列中存储的数据的类型。Gets the type of data stored in the column. 在派生类中重写时,可设置为表示列中数据类型的 Type 对象。Can be set to a Type object that represents the type of data in the column when overridden in a derived class.

DataTypeName

获取数据类型的名称;否则,如果未设置任何值,则为 nullGets the name of the data type; otherwise, null if no value is set. 在派生类中重写时,可设置为数据类型名称或 nullCan be set to either the data type name or null when overridden in a derived class.

IsAliased

获取可为 null 的布尔值,该值指示此列是否具有别名,或者在未设置任何值时返回 nullGets a nullable boolean value that indicates whether this column is aliased, or returns null if no value is set. 在派生类中重写时,可设置为 truefalse,指示此列是否具有别名,也可设置为 null(在 Visual Basic 中为 Nothing)。Can be set to either true or false indicating whether this column is aliased, or null (Nothing in Visual Basic) when overridden in a derived class.

IsAutoIncrement

获取可为 null 的布尔值,该值指示此列中的值是否自动递增,或者在未设置任何值时返回 nullGets a nullable boolean value that indicates whether values in this column are automatically incremented, or returns null if no value is set. 在派生类中重写时,可设置为 truefalse,指示此列中的值是否自动递增,也可设置为 null(在 Visual Basic中为 Nothing)。Can be set to either true or false indicating whether values in this column are automatically incremented, or null (Nothing in Visual Basic) when overridden in a derived class.

IsExpression

获取可为 null 的布尔值,该值指示此列是否是表达式,或者在未设置任何值时返回 nullGets a nullable boolean value that indicates whether this column is an expression, or returns null if no value is set. 在派生类中重写时,可设置为 truefalse,指示此列是否是表达式,也可设置为 null(在 Visual Basic 中为 Nothing)。Can be set to either true or false indicating whether this column is an expression, or null (Nothing in Visual Basic) when overridden in a derived class.

IsHidden

获取可为 null 的布尔值,该值指示此列是否被隐藏,或者在未设置任何值时返回 nullGets a nullable boolean value that indicates whether this column is hidden, or returns null if no value is set. 在派生类中重写时,可设置为 truefalse,指示此列是否被隐藏,也可设置为 null(在 Visual Basic 中为 Nothing)。Can be set to either true or false indicating whether this column is hidden, or null (Nothing in Visual Basic) when overridden in a derived class.

IsIdentity

获取可为 null 的布尔值,该值指示此列是否是标识,或者在未设置任何值时返回 nullGets a nullable boolean value that indicates whether this column is an identity, or returns null if no value is set. 在派生类中重写时,可设置为 truefalse,指示此列是否是标识,也可设置为 null(在 Visual Basic 中为 Nothing)。Can be set to either true or false indicating whether this column is an identity, or null (Nothing in Visual Basic) when overridden in a derived class.

IsKey

获取可为 null 的布尔值,该值指示此列是否是密钥,或者在未设置任何值时返回 nullGets a nullable boolean value that indicates whether this column is a key, or returns null if no value is set. 在派生类中重写时,可设置为 truefalse,指示此列是否是密钥,也可以设置为 null(在 Visual Basic 中为 Nothing)。Can be set to either true or false indicating whether this column is a key, or null (Nothing in Visual Basic) when overridden in a derived class.

IsLong

获取可为 null 的布尔值,该值指示此列是否包含长数据,或者在未设置任何值时返回 nullGets a nullable boolean value that indicates whether this column contains long data, or returns null if no value is set. 在派生类中重写时,可设置为 truefalse,指示此列是否包含长数据,也可设置为 null(在 Visual Basic 中为 Nothing)。Can be set to either true or false indicating whether this column contains long data, or null (Nothing in Visual Basic) when overridden in a derived class.

IsReadOnly

获取可为 null 的布尔值,该值指示此列是否是只读的,或者在未设置任何值时返回 nullGets a nullable boolean value that indicates whether this column is read-only, or returns null if no value is set. 在派生类中重写时,可设置为 truefalse,指示此列是否是只读的,也可设置为 null(在 Visual Basic 中为 Nothing)。Can be set to either true or false indicating whether this column is read-only, or null (Nothing in Visual Basic) when overridden in a derived class.

IsUnique

获取可为 null 的布尔值,该值指示唯一约束是否适用于此列,或者在未设置任何值时返回 nullGets a nullable boolean value that indicates whether a unique constraint applies to this column, or returns null if no value is set. 在派生类中重写时,可设置为 truefalse,指示唯一约束是否适用于此列,也可设置为 null(在 Visual Basic 中为 Nothing)。Can be set to either true or false indicating whether a unique constraint applies to this column, or null (Nothing in Visual Basic) when overridden in a derived class.

Item[String]

获取基于列属性名称的对象。Gets the object based on the column property name.

NumericPrecision

获取列数据的数值精度,否则在未设置任何值时为 nullGets the numeric precision of the column data; otherwise, null if no value is set. 在派生类中重写时,可设置为 int32 值(用于指定列数据的数值精度)或 nullCan be set to either an int32 value to specify the numeric precision of the column data or null when overridden in a derived class.

NumericScale

获取可为 null 的 int32 值,该值将返回 null 或列数据的数值范围。Gets a nullable int32 value that either returns null or the numeric scale of the column data. 在派生类中重写时,可设置为 nullint32 值(用于表示列数据的数值范围)。Can be set to either null or an int32 value for the numeric scale of the column data when overridden in a derived class.

UdtAssemblyQualifiedName

获取表示列中数据类型的 Type 对象的程序集限定名称,否则,在未设置任何值时为 nullGets the assembly-qualified name of the Type object that represents the type of data in the column; otherwise, null if no value is set. 在派生类中重写时,可设置为程序集限定名称或 nullCan be set to either the assembly-qualified name or null when overridden in a derived class.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于