[R] RODBC and Very long field lengths

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Nov 16 21:56:27 CET 2005


On Wed, 16 Nov 2005, tom wright wrote:

> I'm having a small problem using RODBC. I'm trying to retrieve a string
> from a very long memo field (512*20*9=9360 characters = 74880 bytes) in
> an MSAccess database.
> It appears that RODBC set a maximum buffer size for a single column of
> 65535 bytes.

Well, it is documented in the ChangeLog.  (The limit used to be much 
lower.)

> ########## cut from RODBC.c ##########
> 	} else { /* transfer as character */
> 	    int datalen = thisHandle->ColData[i].ColSize;
> 	    if (datalen <= 0 || datalen < COLMAX) datalen = COLMAX;
> 	    /* sanity check as the reports are sometimes unreliable */
> 	    if (datalen > 65535) datalen = 65535;
> ######################################
>
> Can I increase this by just changeing the value in RODBC.c? If so how do
> I get R  to re-compile the package?

Yes, and you re-compile it just like any other package, see the rw-FAQ, 
the R-admin manual and the latest Helpdesk in R-news, for example.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list