Rx_
Nothing In Moderation
- Local time
- Today, 16:15
- Joined
- Oct 22, 2009
- Messages
- 2,803
About to set up another Linked Table column in MSSQLServer for an MSAccess type Boolean. MSAccess 2010 - SQL Server 2008 - ODBC: SQL Server Native Cleint 11.
Revisiting old ideas to make sure they are current. Here are my thoughts, others are very invited to validate or provide alternative suggestions.
In Access yes/No Data types corresponds to the SQL Server BIT data type.
In Access TRUE is -1 and FALSE is 0.
In SQL Server, TRUE is 1 and FALSE is 0.
Access, when linked to this data type will display NULL as FALSE.
To avoid the NULL, set the SQL Server DEFAULT value to 0.
In Access Data view - the linked table field (default) displays as Zero.
In Access Linked Table Design view - the field data type shows as Yes/No - below the format can be changed to True/False.
This allows a query in MSAccess (using the Linked Table) to use a True / False on the field:
SELECT Wells_Status1.ID_WellStatus1, Wells_Status1.Status1, Wells_Status1.Permitted
FROM Wells_Status1
WHERE (((Wells_Status1.Permitted)=True));
Revisiting old ideas to make sure they are current. Here are my thoughts, others are very invited to validate or provide alternative suggestions.
In Access yes/No Data types corresponds to the SQL Server BIT data type.
In Access TRUE is -1 and FALSE is 0.
In SQL Server, TRUE is 1 and FALSE is 0.
Access, when linked to this data type will display NULL as FALSE.
To avoid the NULL, set the SQL Server DEFAULT value to 0.
In Access Data view - the linked table field (default) displays as Zero.
In Access Linked Table Design view - the field data type shows as Yes/No - below the format can be changed to True/False.
This allows a query in MSAccess (using the Linked Table) to use a True / False on the field:
SELECT Wells_Status1.ID_WellStatus1, Wells_Status1.Status1, Wells_Status1.Permitted
FROM Wells_Status1
WHERE (((Wells_Status1.Permitted)=True));