Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
AllowDBNull Field

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

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

XNA Framework

Supported in: 3.0, 2.0, 1.0
© 2015 Microsoft