Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbConnect() not working with the 1.1.1 CRAN update #78

Closed
DavisVaughan opened this issue Jun 23, 2017 · 3 comments
Closed

dbConnect() not working with the 1.1.1 CRAN update #78

DavisVaughan opened this issue Jun 23, 2017 · 3 comments

Comments

@DavisVaughan
Copy link

DavisVaughan commented Jun 23, 2017

Issue Description and Expected Result

dbConnect() not working anymore with the 1.1.1 CRAN update. Incomprehensible error. Potentially an error in the package install process.

Database

Microsoft Access Version 14.0.

I don't know if Access is fully supported yet (from what I can tell, no), but the connection worked yesterday before the CRAN update, and I was able to pull data using dbGetQuery().

To prove that the information is correct, here is a working connection to RODBC.

Connection from RODBC
library(DBI)
cn <- dbConnect(RODBCDBI::ODBC(), dsn = "access-odbc")
dbGetInfo(cn)
#> $dbname
#> [1] "ACCESS"
#> 
#> $db.version
#> [1] "14.00.0000"
#> 
#> $username
#> [1] ""
#> 
#> $host
#> [1] ""
#> 
#> $port
#> [1] ""
#> 
#> $sourcename
#> [1] "access-odbc"
#> 
#> $servername
#> [1] "ACCESS"
#> 
#> $drivername
#> [1] "ACEODBC.DLL"
#> 
#> $odbc.version
#> [1] "03.80.0000"
#> 
#> $driver.version
#> [1] "Microsoft Access database engine"
#> 
#> $odbcderiver.version
#> [1] "03.51"

Other details

I am on a Windows computer running Windows 7 Professional.

Reproducible Example

library(DBI)
cn <- dbConnect(odbc::odbc(), dsn = "access-odbc")
#> Error in connection_info(ptr): nanodbc/nanodbc.cpp:1039: �jY@:

Errors given on installation from CRAN

> install.packages("odbc")

  There is a binary version available but the source version is later:
     binary source needs_compilation
odbc  1.0.1  1.1.0              TRUE

Do you want to install from sources the package which needs compilation?
y/n: y
installing the source packageodbctrying URL 'https://cran.rstudio.com/src/contrib/odbc_1.1.0.tar.gz'
Content type 'application/x-gzip' length 269847 bytes (263 KB)
downloaded 263 KB

* installing *source* package 'odbc' ...
** package 'odbc' successfully unpacked and MD5 sums checked
** libs

*** arch - i386
(cd cctz && \
make libcctz.a PREFIX="../" CC="C:/RBuildTools/3.4/mingw_32/bin/gcc " CXX="C:/RBuildTools/3.4/mingw_32/bin/g++  -std=gnu++11" AR="C:/RBuildTools/3.4/mingw_32/bin/ar" ARFLAGS=rv)
make[1]: Entering directory `/cygdrive/c/Users/mdbva5/AppData/Local/Temp/RtmpIdTSLt/R.INSTALL302069c2f2f/odbc/src-i386/cctz'
C:/RBuildTools/3.4/mingw_32/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O -fPIC -MMD  -c -o time_zone_format.o src/time_zone_format.cc
src/time_zone_format.cc:1:0: warning: -fPIC ignored for target (all code is position independent)
 // Copyright 2016 Google Inc. All Rights Reserved.
 ^
C:/RBuildTools/3.4/mingw_32/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O -fPIC -MMD  -c -o time_zone_if.o src/time_zone_if.cc
src/time_zone_if.cc:1:0: warning: -fPIC ignored for target (all code is position independent)
 // Copyright 2016 Google Inc. All Rights Reserved.
 ^
C:/RBuildTools/3.4/mingw_32/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O -fPIC -MMD  -c -o time_zone_impl.o src/time_zone_impl.cc
src/time_zone_impl.cc:1:0: warning: -fPIC ignored for target (all code is position independent)
 // Copyright 2016 Google Inc. All Rights Reserved.
 ^
C:/RBuildTools/3.4/mingw_32/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O -fPIC -MMD  -c -o time_zone_info.o src/time_zone_info.cc
src/time_zone_info.cc:1:0: warning: -fPIC ignored for target (all code is position independent)
 // Copyright 2016 Google Inc. All Rights Reserved.
 ^
C:/RBuildTools/3.4/mingw_32/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O -fPIC -MMD  -c -o time_zone_libc.o src/time_zone_libc.cc
src/time_zone_libc.cc:1:0: warning: -fPIC ignored for target (all code is position independent)
 // Copyright 2016 Google Inc. All Rights Reserved.
 ^
C:/RBuildTools/3.4/mingw_32/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O -fPIC -MMD  -c -o time_zone_lookup.o src/time_zone_lookup.cc
src/time_zone_lookup.cc:1:0: warning: -fPIC ignored for target (all code is position independent)
 // Copyright 2016 Google Inc. All Rights Reserved.
 ^
C:/RBuildTools/3.4/mingw_32/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O -fPIC -MMD  -c -o time_zone_posix.o src/time_zone_posix.cc
src/time_zone_posix.cc:1:0: warning: -fPIC ignored for target (all code is position independent)
 // Copyright 2016 Google Inc. All Rights Reserved.
 ^
C:/RBuildTools/3.4/mingw_32/bin/ar rv libcctz.a time_zone_format.o time_zone_if.o time_zone_impl.o time_zone_info.o time_zone_libc.o time_zone_lookup.o time_zone_posix.o
a - time_zone_format.o
a - time_zone_if.o
a - time_zone_impl.o
a - time_zone_info.o
a - time_zone_libc.o
a - time_zone_lookup.o
a - time_zone_posix.o
C:\RBuildTools\3.4\mingw_32\bin\ar.exe: creating libcctz.a
make[1]: Leaving directory `/cygdrive/c/Users/mdbva5/AppData/Local/Temp/RtmpIdTSLt/R.INSTALL302069c2f2f/odbc/src-i386/cctz'
C:/RBuildTools/3.4/mingw_32/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-34~1.0/include" -DNDEBUG  -I"C:/Program Files/R/R-3.4.0/library/Rcpp/include" -I"C:/Program Files/R/R-3.4.0/library/BH/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"  -I. -DNANODBC_USE_BOOST_CONVERT -Icctz/include -Inanodbc   -O2 -Wall  -mtune=core2 -c odbc_result.cpp -o odbc_result.o
C:/RBuildTools/3.4/mingw_32/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-34~1.0/include" -DNDEBUG  -I"C:/Program Files/R/R-3.4.0/library/Rcpp/include" -I"C:/Program Files/R/R-3.4.0/library/BH/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"  -I. -DNANODBC_USE_BOOST_CONVERT -Icctz/include -Inanodbc   -O2 -Wall  -mtune=core2 -c connection.cpp -o connection.o
C:/RBuildTools/3.4/mingw_32/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-34~1.0/include" -DNDEBUG  -I"C:/Program Files/R/R-3.4.0/library/Rcpp/include" -I"C:/Program Files/R/R-3.4.0/library/BH/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"  -I. -DNANODBC_USE_BOOST_CONVERT -Icctz/include -Inanodbc   -O2 -Wall  -mtune=core2 -c nanodbc/nanodbc.cpp -o nanodbc.o
C:/RBuildTools/3.4/mingw_32/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-34~1.0/include" -DNDEBUG  -I"C:/Program Files/R/R-3.4.0/library/Rcpp/include" -I"C:/Program Files/R/R-3.4.0/library/BH/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"  -I. -DNANODBC_USE_BOOST_CONVERT -Icctz/include -Inanodbc   -O2 -Wall  -mtune=core2 -c result.cpp -o result.o
C:/RBuildTools/3.4/mingw_32/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-34~1.0/include" -DNDEBUG  -I"C:/Program Files/R/R-3.4.0/library/Rcpp/include" -I"C:/Program Files/R/R-3.4.0/library/BH/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"  -I. -DNANODBC_USE_BOOST_CONVERT -Icctz/include -Inanodbc   -O2 -Wall  -mtune=core2 -c odbc_connection.cpp -o odbc_connection.o
In file included from C:/PROGRA~1/R/R-34~1.0/include/R.h:91:0,
                 from C:/Program Files/R/R-3.4.0/library/Rcpp/include/Rcpp/r/headers.h:52,
                 from C:/Program Files/R/R-3.4.0/library/Rcpp/include/RcppCommon.h:29,
                 from C:/Program Files/R/R-3.4.0/library/Rcpp/include/Rcpp.h:27,
                 from odbc_connection.h:6,
                 from odbc_connection.cpp:1:
C:/PROGRA~1/R/R-34~1.0/include/R_ext/RS.h:55:0: warning: "ERROR" redefined
 #define ERROR   ),error(R_problem_buf);}
 ^
In file included from C:/RBuildTools/3.4/mingw_32/i686-w64-mingw32/include/windows.h:71:0,
                 from sql_types.h:6,
                 from odbc_connection.h:4,
                 from odbc_connection.cpp:1:
C:/RBuildTools/3.4/mingw_32/i686-w64-mingw32/include/wingdi.h:75:0: note: this is the location of the previous definition
 #define ERROR 0
 ^
C:/RBuildTools/3.4/mingw_32/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-34~1.0/include" -DNDEBUG  -I"C:/Program Files/R/R-3.4.0/library/Rcpp/include" -I"C:/Program Files/R/R-3.4.0/library/BH/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"  -I. -DNANODBC_USE_BOOST_CONVERT -Icctz/include -Inanodbc   -O2 -Wall  -mtune=core2 -c RcppExports.cpp -o RcppExports.o
In file included from C:/PROGRA~1/R/R-34~1.0/include/R.h:91:0,
                 from C:/Program Files/R/R-3.4.0/library/Rcpp/include/Rcpp/r/headers.h:52,
                 from C:/Program Files/R/R-3.4.0/library/Rcpp/include/RcppCommon.h:29,
                 from C:/Program Files/R/R-3.4.0/library/Rcpp/include/Rcpp.h:27,
                 from odbc_connection.h:6,
                 from odbc_types.h:4,
                 from RcppExports.cpp:4:
C:/PROGRA~1/R/R-34~1.0/include/R_ext/RS.h:55:0: warning: "ERROR" redefined
 #define ERROR   ),error(R_problem_buf);}
 ^
In file included from C:/RBuildTools/3.4/mingw_32/i686-w64-mingw32/include/windows.h:71:0,
                 from sql_types.h:6,
                 from odbc_connection.h:4,
                 from odbc_types.h:4,
                 from RcppExports.cpp:4:
C:/RBuildTools/3.4/mingw_32/i686-w64-mingw32/include/wingdi.h:75:0: note: this is the location of the previous definition
 #define ERROR 0
 ^
C:/RBuildTools/3.4/mingw_32/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-34~1.0/include" -DNDEBUG  -I"C:/Program Files/R/R-3.4.0/library/Rcpp/include" -I"C:/Program Files/R/R-3.4.0/library/BH/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"  -I. -DNANODBC_USE_BOOST_CONVERT -Icctz/include -Inanodbc   -O2 -Wall  -mtune=core2 -c Iconv.cpp -o Iconv.o
C:/RBuildTools/3.4/mingw_32/bin/g++ -shared -s -static-libgcc -o odbc.dll tmp.def odbc_result.o connection.o nanodbc.o result.o odbc_connection.o RcppExports.o Iconv.o -lodbc32 -Lcctz -lcctz -Ld:/Compiler/gcc-4.9.3/local330/lib/i386 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-34~1.0/bin/i386 -lR
installing to C:/Program Files/R/R-3.4.0/library/odbc/libs/i386

*** arch - x64
(cd cctz && \
make libcctz.a PREFIX="../" CC="C:/RBuildTools/3.4/mingw_64/bin/gcc " CXX="C:/RBuildTools/3.4/mingw_64/bin/g++  -std=gnu++11" AR="C:/RBuildTools/3.4/mingw_64/bin/ar" ARFLAGS=rv)
make[1]: Entering directory `/cygdrive/c/Users/mdbva5/AppData/Local/Temp/RtmpIdTSLt/R.INSTALL302069c2f2f/odbc/src-x64/cctz'
C:/RBuildTools/3.4/mingw_64/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O -fPIC -MMD  -c -o time_zone_format.o src/time_zone_format.cc
src/time_zone_format.cc:1:0: warning: -fPIC ignored for target (all code is position independent)
 // Copyright 2016 Google Inc. All Rights Reserved.
 ^
C:/RBuildTools/3.4/mingw_64/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O -fPIC -MMD  -c -o time_zone_if.o src/time_zone_if.cc
src/time_zone_if.cc:1:0: warning: -fPIC ignored for target (all code is position independent)
 // Copyright 2016 Google Inc. All Rights Reserved.
 ^
C:/RBuildTools/3.4/mingw_64/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O -fPIC -MMD  -c -o time_zone_impl.o src/time_zone_impl.cc
src/time_zone_impl.cc:1:0: warning: -fPIC ignored for target (all code is position independent)
 // Copyright 2016 Google Inc. All Rights Reserved.
 ^
C:/RBuildTools/3.4/mingw_64/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O -fPIC -MMD  -c -o time_zone_info.o src/time_zone_info.cc
src/time_zone_info.cc:1:0: warning: -fPIC ignored for target (all code is position independent)
 // Copyright 2016 Google Inc. All Rights Reserved.
 ^
C:/RBuildTools/3.4/mingw_64/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O -fPIC -MMD  -c -o time_zone_libc.o src/time_zone_libc.cc
src/time_zone_libc.cc:1:0: warning: -fPIC ignored for target (all code is position independent)
 // Copyright 2016 Google Inc. All Rights Reserved.
 ^
C:/RBuildTools/3.4/mingw_64/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O -fPIC -MMD  -c -o time_zone_lookup.o src/time_zone_lookup.cc
src/time_zone_lookup.cc:1:0: warning: -fPIC ignored for target (all code is position independent)
 // Copyright 2016 Google Inc. All Rights Reserved.
 ^
C:/RBuildTools/3.4/mingw_64/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O -fPIC -MMD  -c -o time_zone_posix.o src/time_zone_posix.cc
src/time_zone_posix.cc:1:0: warning: -fPIC ignored for target (all code is position independent)
 // Copyright 2016 Google Inc. All Rights Reserved.
 ^
C:/RBuildTools/3.4/mingw_64/bin/ar rv libcctz.a time_zone_format.o time_zone_if.o time_zone_impl.o time_zone_info.o time_zone_libc.o time_zone_lookup.o time_zone_posix.o
a - time_zone_format.o
a - time_zone_if.o
a - time_zone_impl.o
a - time_zone_info.o
a - time_zone_libc.o
a - time_zone_lookup.o
a - time_zone_posix.o
C:\RBuildTools\3.4\mingw_64\bin\ar.exe: creating libcctz.a
make[1]: Leaving directory `/cygdrive/c/Users/mdbva5/AppData/Local/Temp/RtmpIdTSLt/R.INSTALL302069c2f2f/odbc/src-x64/cctz'
C:/RBuildTools/3.4/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-34~1.0/include" -DNDEBUG  -I"C:/Program Files/R/R-3.4.0/library/Rcpp/include" -I"C:/Program Files/R/R-3.4.0/library/BH/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"  -I. -DNANODBC_USE_BOOST_CONVERT -Icctz/include -Inanodbc   -O2 -Wall  -mtune=core2 -c odbc_result.cpp -o odbc_result.o
C:/RBuildTools/3.4/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-34~1.0/include" -DNDEBUG  -I"C:/Program Files/R/R-3.4.0/library/Rcpp/include" -I"C:/Program Files/R/R-3.4.0/library/BH/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"  -I. -DNANODBC_USE_BOOST_CONVERT -Icctz/include -Inanodbc   -O2 -Wall  -mtune=core2 -c connection.cpp -o connection.o
C:/RBuildTools/3.4/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-34~1.0/include" -DNDEBUG  -I"C:/Program Files/R/R-3.4.0/library/Rcpp/include" -I"C:/Program Files/R/R-3.4.0/library/BH/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"  -I. -DNANODBC_USE_BOOST_CONVERT -Icctz/include -Inanodbc   -O2 -Wall  -mtune=core2 -c nanodbc/nanodbc.cpp -o nanodbc.o
C:/RBuildTools/3.4/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-34~1.0/include" -DNDEBUG  -I"C:/Program Files/R/R-3.4.0/library/Rcpp/include" -I"C:/Program Files/R/R-3.4.0/library/BH/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"  -I. -DNANODBC_USE_BOOST_CONVERT -Icctz/include -Inanodbc   -O2 -Wall  -mtune=core2 -c result.cpp -o result.o
C:/RBuildTools/3.4/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-34~1.0/include" -DNDEBUG  -I"C:/Program Files/R/R-3.4.0/library/Rcpp/include" -I"C:/Program Files/R/R-3.4.0/library/BH/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"  -I. -DNANODBC_USE_BOOST_CONVERT -Icctz/include -Inanodbc   -O2 -Wall  -mtune=core2 -c odbc_connection.cpp -o odbc_connection.o
In file included from C:/PROGRA~1/R/R-34~1.0/include/R.h:91:0,
                 from C:/Program Files/R/R-3.4.0/library/Rcpp/include/Rcpp/r/headers.h:52,
                 from C:/Program Files/R/R-3.4.0/library/Rcpp/include/RcppCommon.h:29,
                 from C:/Program Files/R/R-3.4.0/library/Rcpp/include/Rcpp.h:27,
                 from odbc_connection.h:6,
                 from odbc_connection.cpp:1:
C:/PROGRA~1/R/R-34~1.0/include/R_ext/RS.h:55:0: warning: "ERROR" redefined
 #define ERROR   ),error(R_problem_buf);}
 ^
In file included from C:/RBuildTools/3.4/mingw_64/x86_64-w64-mingw32/include/windows.h:71:0,
                 from sql_types.h:6,
                 from odbc_connection.h:4,
                 from odbc_connection.cpp:1:
C:/RBuildTools/3.4/mingw_64/x86_64-w64-mingw32/include/wingdi.h:75:0: note: this is the location of the previous definition
 #define ERROR 0
 ^
C:/RBuildTools/3.4/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-34~1.0/include" -DNDEBUG  -I"C:/Program Files/R/R-3.4.0/library/Rcpp/include" -I"C:/Program Files/R/R-3.4.0/library/BH/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"  -I. -DNANODBC_USE_BOOST_CONVERT -Icctz/include -Inanodbc   -O2 -Wall  -mtune=core2 -c RcppExports.cpp -o RcppExports.o
In file included from C:/PROGRA~1/R/R-34~1.0/include/R.h:91:0,
                 from C:/Program Files/R/R-3.4.0/library/Rcpp/include/Rcpp/r/headers.h:52,
                 from C:/Program Files/R/R-3.4.0/library/Rcpp/include/RcppCommon.h:29,
                 from C:/Program Files/R/R-3.4.0/library/Rcpp/include/Rcpp.h:27,
                 from odbc_connection.h:6,
                 from odbc_types.h:4,
                 from RcppExports.cpp:4:
C:/PROGRA~1/R/R-34~1.0/include/R_ext/RS.h:55:0: warning: "ERROR" redefined
 #define ERROR   ),error(R_problem_buf);}
 ^
In file included from C:/RBuildTools/3.4/mingw_64/x86_64-w64-mingw32/include/windows.h:71:0,
                 from sql_types.h:6,
                 from odbc_connection.h:4,
                 from odbc_types.h:4,
                 from RcppExports.cpp:4:
C:/RBuildTools/3.4/mingw_64/x86_64-w64-mingw32/include/wingdi.h:75:0: note: this is the location of the previous definition
 #define ERROR 0
 ^
C:/RBuildTools/3.4/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-34~1.0/include" -DNDEBUG  -I"C:/Program Files/R/R-3.4.0/library/Rcpp/include" -I"C:/Program Files/R/R-3.4.0/library/BH/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"  -I. -DNANODBC_USE_BOOST_CONVERT -Icctz/include -Inanodbc   -O2 -Wall  -mtune=core2 -c Iconv.cpp -o Iconv.o
C:/RBuildTools/3.4/mingw_64/bin/g++ -shared -s -static-libgcc -o odbc.dll tmp.def odbc_result.o connection.o nanodbc.o result.o odbc_connection.o RcppExports.o Iconv.o -lodbc32 -Lcctz -lcctz -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-34~1.0/bin/x64 -lR
installing to C:/Program Files/R/R-3.4.0/library/odbc/libs/x64
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (odbc)

The downloaded source packages are inC:\Users\mdbva5\AppData\Local\Temp\RtmpIZ1eds\downloaded_packages

Session info

Session Info
library(DBI)
library(RODBCDBI)
library(odbc)
devtools::session_info()
#> Session info -------------------------------------------------------------
#>  setting  value                       
#>  version  R version 3.4.0 (2017-04-21)
#>  system   i386, mingw32               
#>  ui       RTerm                       
#>  language (EN)                        
#>  collate  English_United States.1252  
#>  tz       America/New_York            
#>  date     2017-06-23
#> Packages -----------------------------------------------------------------
#>  package   * version date       source                      
#>  backports   1.1.0   2017-05-22 CRAN (R 3.4.0)              
#>  base      * 3.4.0   2017-04-21 local                       
#>  bit         1.1-12  2014-04-09 CRAN (R 3.4.0)              
#>  bit64       0.9-7   2017-05-08 CRAN (R 3.4.0)              
#>  blob        1.1.0   2017-06-21 Github (hadley/blob@9dd54d9)
#>  compiler    3.4.0   2017-04-21 local                       
#>  datasets  * 3.4.0   2017-04-21 local                       
#>  DBI       * 0.7     2017-06-18 CRAN (R 3.4.0)              
#>  devtools    1.13.2  2017-06-02 CRAN (R 3.4.0)              
#>  digest      0.6.12  2017-01-27 CRAN (R 3.4.0)              
#>  evaluate    0.10    2016-10-11 CRAN (R 3.4.0)              
#>  graphics  * 3.4.0   2017-04-21 local                       
#>  grDevices * 3.4.0   2017-04-21 local                       
#>  hms         0.3     2016-11-22 CRAN (R 3.4.0)              
#>  htmltools   0.3.6   2017-04-28 CRAN (R 3.4.0)              
#>  knitr       1.16    2017-05-18 CRAN (R 3.4.0)              
#>  magrittr    1.5     2014-11-22 CRAN (R 3.4.0)              
#>  memoise     1.1.0   2017-04-21 CRAN (R 3.4.0)              
#>  methods   * 3.4.0   2017-04-21 local                       
#>  odbc      * 1.1.0   2017-06-23 CRAN (R 3.4.0)              
#>  Rcpp        0.12.11 2017-05-22 CRAN (R 3.4.0)              
#>  rlang       0.1.1   2017-05-18 CRAN (R 3.4.0)              
#>  rmarkdown   1.6     2017-06-15 CRAN (R 3.4.0)              
#>  RODBC       1.3-15  2017-04-13 CRAN (R 3.4.0)              
#>  RODBCDBI  * 0.1.1   2016-03-14 CRAN (R 3.4.0)              
#>  rprojroot   1.2     2017-01-16 CRAN (R 3.4.0)              
#>  stats     * 3.4.0   2017-04-21 local                       
#>  stringi     1.1.5   2017-04-07 CRAN (R 3.4.0)              
#>  stringr     1.2.0   2017-02-18 CRAN (R 3.4.0)              
#>  tibble      1.3.1   2017-05-17 CRAN (R 3.4.0)              
#>  tools       3.4.0   2017-04-21 local                       
#>  utils     * 3.4.0   2017-04-21 local                       
#>  withr       1.0.2   2016-06-20 CRAN (R 3.4.0)              
#>  yaml        2.1.14  2016-11-12 CRAN (R 3.4.0)

Comments

Not even sure how to go about solving this one. Any advice would be appreciated.

@jimhester
Copy link
Contributor

The Access driver does not seem to provide full support for SQLGetInfo. It is hard to know for sure what the cause is without an access database to test against (and the unhelpful error message), but I took a guess.

Could you try installing the access branch and see if that fixes your issue?

devtools::install_github("rstats-db/odbc@access")

@DavisVaughan
Copy link
Author

Sure enough, I got a warning message, but a successful connection with that branch.

library(DBI)
cn <- dbConnect(odbc::odbc(), dsn = "access-odbc")

#Warning in value[[3L]](cond) :
#   Could not notify connection observer. nanodbc/nanodbc.cpp:4274: HYC00: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented  

I was then able to use cn to perform a successful dbGetQuery().

I've run into other issues along the way (dbWriteTable() giving an "Invalid precision error". Inability to create tbl() objects from a table), but I'll leave those for separate issues.

Thanks for the help. Anything else you want me to test with this one?

jimhester added a commit that referenced this issue Jun 23, 2017
Workaround for drivers which do not implement SQLGetInfo, such as the Access
driver.

Fixes #78
@jimhester
Copy link
Contributor

From that warning is seems like the Access driver does not support listing tables, which is going to make many things not function as expected. But if you are willing to soldier on I will try to fix issues if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants