[R] rodbc or unixodbc error

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Feb 22 08:33:24 CET 2005


For future information, this is almost exactly the contents of the README 
file in the RODBC package, which contains further useful hints.

The unixODBC site (www.unixODBC.org/odbcinst.html) has a useful 
tutorial, too.


On Mon, 21 Feb 2005, Sebastian Luque wrote:

> Hi Dirk,
>
> That worked beautifully, thanks a lot! I was able to connect to a test
> database, save to it (sqlSave), and query it (odbcQuery). Some comments
> below for future reference.
>
>
> Dirk Eddelbuettel <edd at debian.org> wrote:
>
> [...]
>
>> -----------------------------------------------------------------------------
>> edd at basebud:~> cat /etc/odbcinst.ini
>> [PostgreSQL]
>> Description = PostgreSQL ODBC driver for Linux and Windows
>> Driver = /usr/lib/postgresql/lib/psqlodbc.so
>> Setup = /usr/lib/odbc/libodbcpsqlS.so
>> Debug = 0
>> CommLog = 1
>>
>> [MySQL]
>> Description = MySQL driver
>> Driver = /usr/lib/odbc/libmyodbc.so
>> Setup = /usr/lib/odbc/libodbcmyS.so
>> CPTimeout =
>> CPReuse =
>> FileUsage = 1
>> -----------------------------------------------------------------------------
>
> Except for PostgreSQL, this was the default configuration that MySQL or
> unixODBC must have entered here during installation.
>
>
>> ii) /etc/odbc.ini
>
> This file was empty in my system, so adapting your recommendation:
>
> ,-----[ /etc/odbc.ini (lines: 1 - 7) ]
> | [test]
> | Driver       = /usr/lib/odbc/libmyodbc.so
> | Database     = test
> | Servername   = localhost
> | ReadOnly     = 0
> | Port	       = 3306
> `-----
>
> and followed the same template to include the rest of my databases further
> down.
>
> Can the latter go in ~/.odbc.ini as I said before? I hope so, as this
> would allow for much easier maintenance.
>
> Thanks again for the helpful reply.
>
> -- 
> Sebastian Luque
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

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