I was finally able to patch RODBC_1.3-3 under cygwin to use the
windows ODBC driver
manager. No libiodbc needed. The patch is virtually identical to the
one listed in the R-RODBC packaged in the git repository for cygwin
ports:
http://cygwin-ports.git.sourceforge.net/git/gitweb.cgi?p=cygwin-ports/R-RODBC;a=tree

After manually patching the RODBC_1.3-3.tar.gz file as shown below, I
run the following commands from the bash shell:

$ export ac_cv_search_SQLTables="-lodbc32"
$ r
> install.packages('RODBC_1.3-3.tar.gz')

RODBC installed fine and I am now able to connect to the existing DSN
(no new drivers, NTLM works fine). I am posting these instructions
just in case someone else is interested in using R under cygwin and
connect to databases requiring NTLM.
Thanks again for the help,
Dario

===RODBC.c in RODBC_1.3-3.tar.gz===
@@ -38,6 +38,12 @@
#endif
#include <string.h>
#include <limits.h> /* for INT_MAX */

+#ifdef __CYGWIN__
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32
+#endif
+
#include <sql.h>
#include <sqlext.h>

On Wed, Sep 14, 2011 at 1:45 AM, Yaakov (Cygwin/X)
<[email protected]> wrote:
> On Tue, 2011-09-13 at 22:24 -0700, Dario Buttari wrote:
>> Is the cygwin version of libiodbc-devel able to connect to the
>> user/system DSNs available under windows,
>
> No.
>
>> or do I need to create new DSNs and install new drivers under cygwin?
>
> Yes, although Ports already provides ODBC drivers for MS Access
> (odbc-mdb), MySQL (odbc-mysql), PostgreSQL (odbc-psql, as of the next
> upload), SQLite (odbc-sqlite3), and Sybase/MS-SQL Server (odbc-tdb)
> databases.
>
>> Most of the databases I would like to connect to (oracle/sql server
>> databases) use Windows Authentication (NTLM) to grant access.
>> Hopefully that kind of authentication will be still available in case
>> I need to install new odbc drivers under cygwin.
>
> odbc-tdb should permit connections to MS SQL Server.  You will need to
> find an ODBC driver for Oracle Database which can be built from sources.
>
>
> Yaakov
> Cygwin Ports
>
>
>
> ------------------------------------------------------------------------------
> BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
> Learn about the latest advances in developing for the
> BlackBerry&reg; mobile platform with sessions, labs & more.
> See new tools and technologies. Register for BlackBerry&reg; DevCon today!
> http://p.sf.net/sfu/rim-devcon-copy1
> _______________________________________________
> Cygwin-ports-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cygwin-ports-general
>

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
Cygwin-ports-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cygwin-ports-general

Reply via email to