not evaluating True/False properly

Dylan Snyder

Registered User.
Local time
Today, 17:48
Joined
Dec 31, 2007
Messages
89
I recently added a bit field to an SQL table. The table already had bit fields in it before that worked properly. I added a new one. In access, when I run a query on it, no records are returned when I enter anything as a criterion. True, False, o, 1...doesn't matter. when I leave the criterion blank, all the records show. All other bit fields on this table work properly. has this happened to anyone else?
 
In SQL Server the bit is 0 or 1, in Access False is 0 and True is -1 so you have to massage things a bit to get them to work together.
 
Thanks, good to know
so simply adding True or False will no longer work? Oddly enough, it looks like it shows the appropriate records when I select Is Null.
 
yep---Is Null and Is Not Null work for True and False. I'm thinking maybe I should get back into enterprise manager and delete/add the field again.
 
I would just add it as a small integer and then storing 1 or -1 or 0 won't matter.
 
thanks,
So I can change to small integer and then set it up as True false in Access and it will accomplish what I'm trying to do? I have set up many bit fields and they appear to work. I guess the server picked this one to mess up.
 
Yes, we are currently doing that on a job I am working on and it works fine.
 
Thanks for your help. I'll just change to small integer and all should be well. Thanks!
 
I tried to improve your rep but I guess you helped me last time on a project so I can't. Thanks nonetheless
 
I tried to improve your rep but I guess you helped me last time on a project so I can't. Thanks nonetheless

Yeah, you'll have to give out rep points to at least 10 (I believe) different people before you can give it to the same person again. Hey, but when you have, feel free to come back and give me more :D
 

Users who are viewing this thread

Back
Top Bottom