ObjectDataSource.ConvertNullToDBNull ObjectDataSource.ConvertNullToDBNull ObjectDataSource.ConvertNullToDBNull ObjectDataSource.ConvertNullToDBNull Property

定义

获取或设置一个值,该值指示传递给更新、插入或删除操作的 Parameter 值是否由 Value 控件自动从 null 转换为 ObjectDataSource 值。Gets or sets a value indicating whether the Parameter values that are passed to an update, insert, or delete operation are automatically converted from null to the Value value by the ObjectDataSource control.

public:
 property bool ConvertNullToDBNull { bool get(); void set(bool value); };
public bool ConvertNullToDBNull { get; set; }
member this.ConvertNullToDBNull : bool with get, set
Public Property ConvertNullToDBNull As Boolean

属性值

如果传递给 Parameter 控件的 ObjectDataSource 对象中的任何 true 值自动转换为 Value 值,则为 null;否则为 falsetrue, if any null values in Parameter objects passed to the ObjectDataSource control are automatically converted to Value values; otherwise, false. 默认值为 falseThe default is false.

注解

不转换null Value为值会导致运行时出现错误。Not converting null to the Value value can result in errors at run time. ObjectDataSource Value null Parameter使用属性来指示传递给更新、插入或删除操作的值是否由控件自动转换为值。 ConvertNullToDBNullUse the ConvertNullToDBNull property to indicate whether Parameter values that are passed to an update, insert, or delete operation are automatically converted from null to the Value value by the ObjectDataSource control.

适用于

另请参阅