# [ASP] Dealing w/ MSSQL bit datatype

This topic is 4733 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have a field in one of the databases I'm working with in the bit datatype. So either the field is a 0 or 1. Now I have to read these values to an ASP page to display. It works fine whenever I read the bit value of 1, but whenever I come across a bit value of 0, I get a MS SQL error:
error '80020009'
Exception occurred.

/marketing/product/report.asp, line 129
Line 129 is part of this 'if' statement:
        If rs2("LicenseRequired") <> true then '<---Line 129
Response.Write "False"
Else
End If
I'm not sure how to go about checking a bit value, any help? Thanks!

##### Share on other sites
Nevermind, figured the issue out.

do tell.

##### Share on other sites
Turns out there were missing records, these people can't manage their databases for crap. =/

• 9
• 13
• 41
• 15
• 14