[R] RODBC working in Rgui but not Rterm

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Feb 7 09:24:37 CET 2005


On Mon, 7 Feb 2005, John Fox wrote:

> Dear Shlomo,
>
> Just last week I experienced a similar problem with RODBC and MySQL under
> Windows, though the problem extended to both Rterm *and* Rgui. After a fair
> amount of detective work, I discovered that the source of the difficulty was
> a newly downloaded MySQL ODBC Windows driver. When I instead installed a
> driver downloaded last December, everything worked fine. I've just confirmed
> that I can access MySQL from both Rterm and Rgui. I'm using R 2.0.1 under
> Windows XP.
>
> Since your symptoms are slightly different from mine, the ODBC driver may
> not be the source of the difficulty, but I thought that it might be
> worthwhile to mention it.

There are two problems here

1) The latest MyODBC (3.51-10) has a problem that 3.51-07 did not have, as 
I found yesterday on both Linux and Windows (I am preparing an RODBC 
update).

I've now read the sources, and it has a logic bug: it throws the error

    state IM008 Invalid window handle for connection completion argument

whether or not any completion is needed.  RODBC 1.1-3 will have a 
workaround for this.

2) There _is_ a documented difference between RGui and Rterm: see 
?odbcConnect:

      Under the Windows GUI, specifying an incomplete 'connection', for
      example the default '""', will bring up a dialog box to complete
      the information required.  (This does not work from 'Rterm.exe'
      unless a driver is specified, a Windows restriction.)

As a result of these two, MyODBC 3.51-10 ought to work under RGui and not 
under Rterm.

Moral: if you can, downgrade your MyODBC driver, or wait for RODBC_1.1-3

Brian

-- 
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