c# - CBool function returning integer in Access SQL statement -


i using c# executereader method read data access db. have string field in access table , in query converting bool using below code:

iif(isxyz = 'true',cbool(1=1),cbool(1=0)) isxyz 

above statement returning int16 value me in data reader. per

https://support.office.com/en-us/article/type-conversion-functions-8ebb0e94-2d43-4975-bb13-87ac8d1a2202

it's supposed return bool, missing here?

what missing here?

i don't think you're missing anything. have recreated issue using system.data.oledb, system.data.odbc, , in access using dao.recordset. seems cbool return boolean in vba statement, return integer in access sql statement. :(


Comments