Friday, March 23, 2012

Linked SQL Server 2000 Table Displaying -1 Instead of 1 for Binary

Hello all - I have something strange going on with a linked SQL Server 2000
table in Access 97. One of the fields in the table is a Binary data type.
When viewing the table in Access, I see -1 instead of a 1 for this field in
the table (even though it correctly displays 1s where approproate when viewed
from Enterprise Manager). I was about to convert the field to a TINYINT in
SQL, but figured I should try to understand the behavior instead of
circumventing it!
Any suggestions would be greatly appreciated! Thanks...
...Doug
Do you mean bit field?
If so, SQL Server treats a true bit as 1 and false as 0. Access and VB
treat true as
-1 and false as 0.
"pittpanther" wrote:

> Hello all - I have something strange going on with a linked SQL Server 2000
> table in Access 97. One of the fields in the table is a Binary data type.
> When viewing the table in Access, I see -1 instead of a 1 for this field in
> the table (even though it correctly displays 1s where approproate when viewed
> from Enterprise Manager). I was about to convert the field to a TINYINT in
> SQL, but figured I should try to understand the behavior instead of
> circumventing it!
> Any suggestions would be greatly appreciated! Thanks...
> ...Doug
sql

No comments:

Post a Comment