SqlParameter.IsNullable 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
매개 변수가 null 값을 허용하는지 여부를 나타내는 값을 가져오거나 설정합니다. IsNullable 는 매개 변수 값의 유효성을 검사하는 데 사용되지 않으며 명령을 실행할 때 null 값을 보내거나 받는 것을 방지하지 않습니다.
public:
property bool IsNullable { bool get(); void set(bool value); };
public:
virtual property bool IsNullable { bool get(); void set(bool value); };
[System.ComponentModel.Browsable(false)]
[System.Data.DataSysDescription("DataParameter_IsNullable")]
public bool IsNullable { get; set; }
public override bool IsNullable { get; set; }
[<System.ComponentModel.Browsable(false)>]
[<System.Data.DataSysDescription("DataParameter_IsNullable")>]
member this.IsNullable : bool with get, set
member this.IsNullable : bool with get, set
Public Property IsNullable As Boolean
Public Overrides Property IsNullable As Boolean
속성 값
truenull 값이 허용되면 이고, 그렇지 않으면 . false 기본값은 false입니다.
- 특성
예제
다음 예제에서는 해당 SqlParameter 속성 중 일부를 만들고 설정합니다.
static void CreateSqlParameterNullable()
{
SqlParameter parameter = new SqlParameter("Description", SqlDbType.VarChar, 88);
parameter.IsNullable = true;
parameter.Direction = ParameterDirection.Output;
}
Private Sub CreateSqlParameterNullable()
Dim parameter As New SqlParameter("Description", SqlDbType.VarChar, 88)
parameter.IsNullable = True
parameter.Direction = ParameterDirection.Output
End Sub
설명
Null 값은 클래스를 DBNull 사용하여 처리됩니다.