ODBC Driver issue with Oracle datasources

Problem
> library(RODBC) 

> ch <- odbcConnect("jcgi")

Cannot output the result 
> sqlQuery(ch,"select sysdate from dual") 
Error in .Call(C_RODBCFetchRows, attr(channel, "handle_ptr"), max, 
buffsize, : 
negative length vectors are not allowed

with 32bit oracle library

> library(RODBC) 
> ch <- odbcConnect("jcgi") 
Warning messages: 
1: In odbcDriverConnect("DSN=jcgi") : 
[RODBC] ERROR: state 01000, code 0, message [unixODBC][Driver 
Manager]Can't open lib 
'/usr/lib/oracle/11.2/client/lib/libsqora.so.11.1' : 
/usr/lib/oracle/11.2/client/lib/libsqora.so.11.1: wrong ELF class: 
ELFCLASS32 
2: In odbcDriverConnect("DSN=jcgi") : ODBC connection failed
Solution
Add the option 'believeNRows = FALSE' in your odbcConnect() call. 

This option needs to be set when importing data from Oracle databases.
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.
Vlastnosti

ID článku: 3103851 - Poslední kontrola: 11/01/2015 15:56:00 - Revize: 1.0

Revolution Analytics

  • KB3103851
Váš názor
sqlQuery(ch,"select sysdate from dual") Error in .Call(C_RODBCFetchRows, attr(channel, "handle_ptr"), max, buffsize, : negative length vectors are not allowed with 32bit oracle..." />
sqlQuery(ch,"select sysdate from dual") Error in .Call(C_RODBCFetchRows, attr(channel, "handle_ptr"), max, buffsize, : negative length vectors are not allowed with 32bit oracle..." />