Converting Bits to Yes/No Values
Written by Eric Smith, Northstar Computer Systems LLC
In an application I have been building, I have many cases in which I need to display the value of bit fields in SQL Server to the user. Instead of showing zeroes and ones or Trues and Falses, I created a quick little function that converts the values to Yes and No.
Function ConvertBitToYN(blnInput)
If blnInput Then
ConvertBitToYN = "Yes"
Else
ConvertBitToYN = "No"
End If
End Function
It's simple code, but it's the simple functions that make programming quicker and less bug-prone.
Keywords: [
Uncategorized ASP Tips
]
Publication Date: 2/1/2000
|