Sets or gets a value which indicates whether the source column is nullable. This allows DbCommandBuilder to correctly generate Update statements for nullable columns.
Assembly: System.Data (in System.Data.dll)
'Declaration Public MustOverride Property SourceColumnNullMapping As Boolean 'Usage Dim instance As DbParameter Dim value As Boolean value = instance.SourceColumnNullMapping instance.SourceColumnNullMapping = value
Property ValueType: System.Boolean
true if the source column is nullable; false if it is not.
DbCommandBuilder uses this property to determine whether the source column is nullable, and sets this property to true if it is nullable, and false if it is not. When DbCommandBuilder is generating its Update statement, it examines the for each parameter. If the property is true, DbCommandBuilder generates a WHERE clauses like the following (in this query expression, "FieldName" represents the name of the field):
((@IsNull_FieldName = 1 AND FieldName IS NULL) OR (FieldName = @Original_FieldName))
If for the field is false, DbCommandBuilder generates the following WHERE clause:
FieldName = @OriginalFieldName
In addition, @IsNull_FieldName contains 1 if the source field contains null, and 0 if it does not. This mechanism allows for a performance optimization in SQL Server, and provides for common code that works across multiple providers.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.