SchemaTableColumn.AllowDBNull Field


Specifies whether value DBNull is allowed.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

public static readonly string AllowDBNull

Field Value

Type: System.String

Returns the string "true" if DBNull is allowed; otherwise "false".


Avoid setting AllowDbNull to "true" for primary key columns. A column defined as a primary key can be set to AllowDbNull, but a null value cannot be assigned to it.

.NET Framework
Available since 2.0
Return to top