Yes/No Field Problem

  • Thread starter Thread starter Earl Partridge
  • Start date Start date
E

Earl Partridge

Access 2000
I added (actually replaced a text field) with a Yes/No type, setting Format
to True/False. This put a box in that field which can contain a check mark.
I try to update this live on the net with an .asp page and get Data Type
Mismatch. Should the True/False be something different?
Earl
 
You shouldn't need formatting at all - it's really just a Boolean field
type. My guess would be that the field on the ASP page is not set to
Boolean, and is trying to assign a text value to the field.
 
When the informtion for that field is displayed, it shows either "True" or
"False". With your help, I have determined that when I update that record
that field must contain either -1 or 0. Should I be able to change some
setting that will show -1 or 0 instead of True or False?
Earl
 
No change should be necessary: what's actually stored is -1 or 0, regardless
of the format.

Do you know exactly how the ASP page is trying to update the tables: might
it be trying to use True or False in quotes, making it text, rather than the
literals True or False?
 
When viewed, that field displays either "True" or "False". If my update
does not
affect that field then I would not change it, thus updating would attempt to
write
the value as it was read/displayed. I guess the easiest solution is that I
will need
to change them to either -1 or 0 before updating? Or, perhaps change them
to
either "-1" or "0" when reading from the database and displaying?
Earl
 
It took a while but it finally dawned on me... I was enclosing the "True" or
"False" within single quotes. The answers here helped me to realize that.
Thanks everyone.
Earl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top