开发者

How to pass null for a parameter in stored procedure - the parameter is uniqueidentifier

开发者 https://www.devze.com 2022-12-23 22:24 出处:网络
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 typeSet the parameter value to DBNull.Value.param = New SqlParam

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
0

精彩评论

暂无评论...
验证码 换一张
取 消