RODBC Error Code 202 When Trying to Connect to DB - r

I'm getting errors like the following when I try to connect to a database using RODBC:
ch <- odbcConnect("getdata",uid='uid',pwd='pwd')
[RODBC] ERROR: state , code 202, message ��������������������
What is code 202? And what is that unreadable message supposed to be? I'm running R 3.0.2 on OS X 10.8.

I got rid of this error message by recompiling the psqlodbc driver without unicode support.
I still can't connect using RODBC though.

Related

How can I get past this 'SSL connect error' when using jsonlite::fromJSON in R?

Issue
I get the following error whenever I run
all_companies <- jsonlite::fromJSON("https://www.sec.gov/files/company_tickers_exchange.json")
Warning: URL 'https://www.sec.gov/files/company_tickers_exchange.json': status was 'SSL connect error'Error in open.connection(con, "rb") :
cannot open the connection to 'https://www.sec.gov/files/company_tickers_exchange.json'
Thank you in advance for any help!
What I've tried
I am trying to run this on a new work computer, it runs fine on my old work computer but the new one gives me this error.
It seems the difference causing this issue is that I am using {jsonlite} 1.8.2 on my new computer and 1.8.0 on my old computer. Deep in the definition of the fromJSON() function, the working version seems to use curl::curl() to establish a connection whereas the not-working version uses base::url().
The following example line from the help documentation runs fine on the new computer with version 1.8.2
data1 <- fromJSON("https://api.github.com/users/hadley/orgs")
I can access the JSON file I am trying to read on an internet browser.
I do not have permission to install Rtools on my computer to be able to compile an older version of {jsonlite}.

Connecting Oracle to R issue

I am trying to connect Oracle to RStudio using the "ROracle" package. I've installed the package and loaded it. I also have the "DBI" package installed and loaded.
I am using dbConnect(dbDriver("Oracledrivername"),oracle_schema,oracle_password,dbname="dbname") to connect to my oracle schema but I am getting this error:
Error in h(simpleError(msg,call)):
eror in evaluating the argument 'drv' in selecting a method for function 'dbConnect'
I then tried to narrow it down by testing dbDriver("Oracledrivername") by itself and the Error I get is:
Error: Couldn't find driver Oracledrivername
Things that I have done to attempt to fix this are:
I tested my connection to "Oracledrivername" in the ODBC data source administrator, the connection was ok.
The Rstudio I am using is 64 bit, Oracle client is a v12.1.0 64 bit, and the ODBC driver was set up on 64 bit
I have set the oracle_home location to C:\ORACLE12_64BIT\product\12.1.0\client_1

R Code works fine in RStudio but not in terminal - ODBC SQL - Failed to load the security library: (libgssapi_krb5.dylib)

I have some R code made in RStudio. It connects to SQL-Server, runs a query and saves out a csv.
It runs fine in RStudio but i want it to run in terminal so I can schedule it daily.
I have tried googling the error message for I can't seem to find what im looking for.
The SQL server authenticates with Windows Auth. Therefor im not suppling a username and password.
library(odbc)
con <- dbConnect(odbc::odbc(),.connection_string = "Driver={Simba SQL Server ODBC Driver};
Server=MYSERVER;
Database=TEST;
trusted_connection=true")
This is the error message I'm getting:
Error: nanodbc/nanodbc.cpp:950: HY000: [Simba][Support] (50366) Failed to load the security library: (libgssapi_krb5.dylib)
Execution halted
I'm really new to R so I'm not too sure whats happening, any help would be really appreciated.
Thanks!

Loading EXASOL data in R. Unknown ODBC error

R is unable to read the EXASOL Database due to some unknown ODBC error. Has anyone come across a similar instance. The problem occurs with Mac OS.
I have installed the ODBC driver for Mac OS.
library(exasol)
library(RODBC)
con <- dbConnect("exasol", **)
# removed the connection credentials
df1 <- dbGetQuery(con,paste("query", sep=""))
# removed the query
Error in try(.Call(C_asyncRODBCQueryFinish, slot, 1)) :
Unknown ODBC error
Error in exa.readData(conn, statement, ...) :
Could not allocate SQLAllocHandle (-2)
Error in exa.readData(conn, statement, ...) : Unknown ODBC error
The issue is at the moment unanswered here https://github.com/exasol/r-exasol/issues/32.
Can you tell more about the tools/drivers/components you use? Version numbers and the like?
I have some faint memories of seeing the same (or very similar error message) when I tried to use unixodbc. I had to remove it and use libiodbc. May it be the source of the issue in your case?
I had a similar issue, what helped me was to reinstall install.packages("RODBC", type="source")

7: [unixODBC][DataDirect][ODBC 20101 driver]6015 error

For our application we have planned to use the Progress Data Direct ODBC driver for oracle. So i have downloaded the EVAL version and installed it. Our application servers are running in the Linux environment.
After installing the EVAL version i have tested the sample code provided by them. I have configured the ODBC.INI and ODBCINST.INI properly.
Tested the DSN connection successfully with the sample program provided by DataDirect Progress.
Then i started using the same for my application Lib LD path set properly ODBC , ODBCINST variables are properly set.
when i try to bring up my servers i got the below error message
7: [unixODBC][DataDirect][ODBC 20101 driver]6015
In this message i'm not getting the message description , only i got the error code which is 6015
How to get the error message for this code 6015 ?
Any help on this?
Due to the older version of driver got the error , so installed newer version and it got resolved.

Resources