How to pass null for a parameter in stored procedure - the parameter is uniqueidentifier
In C# code I have a variable Guid? name.But,how to initialize this paramete开发者_Go百科r to null,since I cannot assign null for a guid type
Set the parameter value to DBNull.Value
.
param = New SqlParameter("@GUID_ID", SqlDbType.UniqueIdentifier, 16)
param.Value = DBNull.Value
精彩评论