Access vs. SQL bit datatype linked table
Posted on 2002-04-23
I have a linked table in Access 2000 which is linked to a SQL table which has a bit datatype field called [FIELDBIT].
I want to pass this bit to a stored procedure call mysp using a pass-through qry as such:
sp_SQL = "EXECUTE mysp " & _
"'" & arg1 & "'," & _
"'" & arg2 & "'," & rs![FIELDBIT]
The value of rs!FIELDBIT is not 1 or 0(as it would be in sql) but True and False. So my pass-through qry translates to this:
EXECUTE mysp arg1,arg2, TRUE
SQL balks, converting nvarchar to bit. SQL would prefer this:
EXECUTE mysp arg1,arg2, 1
I know how to code a work-around. Abs(CInt(rs![FIELDBIT]))
My question is how to call the sp without a workaround?