The Bad Bits form
In the previous sections, we have not worked with bit fields except to set the default values. Bit fields are known as Yes
/No
fields in MS Access. When migrated to MySQL, they will become either a Bit
or a TinyInt
type, depending on how you migrated the table. Both types have some very peculiar properties when linked back to MS Access, which you need to know about. Let's have a further look here:
Bit
- Will only accept -1 or 0 (
True
/False
) - Will accept
NULL
but then will no longer work with Access
- Will only accept -1 or 0 (
TinyInt
- Will accept -128 to 127
- Will accept
NULL
and continue to work with Access
A TinyInt
type may be the best choice for an MS Access Yes
/No
field. It will take NULL
, 0 is False
, and any other value is True
. Access will put -1 if selected in a CheckBox control. However, if you do have a bit field, you will get an interesting and baffling issue. If you are not aware of what to look for, this section is an informational exercise only; there will be no...