Skip to content
Prev 1058 / 1559 Next

NULL data not mapped to NA with RODBC on 64-bit Mac OS X

OK, with the help of a rusty C coder at work, I've confirmed that the
solution the Python crew figured out also seems to work for me. I have no
idea if it breaks the 32-bit MacOS build, or any other build. Note that this
seems to be a very subtle effect of the way the compiler and header files
are interacting, as far as I can tell. The commented-out warning() in the
code was used to confirm that without the casts, the len variable and
SQL_NULL_DATA are, in fact, the same, and that despite their being the same,
the equality test fails.

A patch is attached. All of the len variables are cast to ints. (Note that
casting to long, which should work, doesn't.) Would someone please apply to
patch to the source tree and do some regression testing?

-Harlan
On Thu, Mar 31, 2011 at 9:35 AM, Harlan Harris <harlan at harris.name> wrote:

            
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-db/attachments/20110418/f686577d/attachment.html>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: RODBC.c.diff
Type: application/octet-stream
Size: 901 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-db/attachments/20110418/f686577d/attachment.obj>