D
DotNetNewbie
Hi,
I need a datatype (or enum?) that can hold the possible values: true/
false/null
I will use it in ADO.NET code like:
sqlCmd.Parameters.Add("@isApproved", SqlDbType.Bit, 1).Value = ?????;
This way I can pass values of true,false or null to my stored
procedure.
Is there a way to do this or do I have to do things like :
if(myEnum != MyEnum.NULL)
sqlCmd.Parameters.Add("@isApproved", SqlDbType.Bit, 1).Value =
myEnum;
I need a datatype (or enum?) that can hold the possible values: true/
false/null
I will use it in ADO.NET code like:
sqlCmd.Parameters.Add("@isApproved", SqlDbType.Bit, 1).Value = ?????;
This way I can pass values of true,false or null to my stored
procedure.
Is there a way to do this or do I have to do things like :
if(myEnum != MyEnum.NULL)
sqlCmd.Parameters.Add("@isApproved", SqlDbType.Bit, 1).Value =
myEnum;