Thank you again Yaakov. I greatly appreciate your help. It seems I will have to learn a great deal in order to use odbc under cygwin properly.
I am really distracted by the presence of the w32api under cygwin, and by the presence of the sql.h, sqlext.h, odbcinst.h, windows.h, libodbc32.a, libpdbccp32.a under that package. I completely ignorant on how cygwin works, but I still hope that source code compiled under cygwin might still be able to connect to the windows ODBC driver manager through the w32api (or by installing some other cygwin package). This old message regarding a perl module under cygwin gives me some hope in this sense: http://cygwin.com/ml/cygwin/2009-11/msg00901.html Let me know if I am completely off in my understanding (that will save me a lot of time). Going back to RODBC. It seems that RODBC looks for the unix ODBC Driver managers and therefore fails if iodbc is not installed. Is there any hope that I will be able to modify the RODBC source code so that it uses the windows ODBC driver manager instead? I am still distracted by the now obsolete 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 I do not fully understand the goal of the 1.2_3-cygwin-odbc32.patch file under that port, but its content (see code below) still gives me the hope that I have an opportunity to fix the RODBC source code if I knew more (e.g. include the windows.h library under cygwin, and hopefully establish a connection to the the windows ODBC driver manager). Based on your experience, do you think that I could contact the authors of the RODBC package for help? Please let me know if I am way off in my understanding, and I am just wasting everybody's time speaking nonsense due to lack of knowledge. ### 1.2_3-cygwin-odbc32.patch ### --- origsrc/RODBC/src/RODBC.c 2008-01-24 05:58:26.000000000 -0600 +++ src/RODBC/src/RODBC.c 2008-01-27 10:19:12.828125000 -0600 @@ -38,6 +38,12 @@ #endif #include <string.h> +#ifdef __CYGWIN__ +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#undef WIN32 +#endif + #include <sql.h> #include <sqlext.h> ### end 1.2_3-cygwin-odbc32.patch ### Many thanks, Dario 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® DevCon Americas, Oct. 18-20, San Francisco, CA > Learn about the latest advances in developing for the > BlackBerry® mobile platform with sessions, labs & more. > See new tools and technologies. Register for BlackBerry® 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® DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerry® mobile platform with sessions, labs & more. See new tools and technologies. Register for BlackBerry® 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
