64-bit bug with odbcserver. Values returned from DB should be casted to SQLINTEGER, rather than long.