问题
In C# code I have a variable Guid? name.But,how to initialize this parameter to null,since I cannot assign null for a guid type
回答1:
Set the parameter value to DBNull.Value
.
回答2:
param = New SqlParameter("@GUID_ID", SqlDbType.UniqueIdentifier, 16)
param.Value = DBNull.Value
来源:https://stackoverflow.com/questions/2490514/how-to-pass-null-for-a-parameter-in-stored-procedure-the-parameter-is-uniqueid