linux - R RODBC package under Ubuntu -


When I try my code on Ubuntu / Linux R, I get an error

  & Gt; Library ('rodbc') & gt; Snm & lt; - "Blow" & gt; Dbname & lt; - "BB" & gt; Dbhandle & lt; - Warning message: 1: In odbcDriverConnect [RODBC] - odbcDriverConnect (Paste ("driver = {SQL Server}; server =", snm, "; database =", dbname, "; trusted_connection = true", sep = "")) Error: State IM002, Code 0, Message [unixODBC] [Driver Manager] The name of the data source was not found, and no default driver is specified: (Paste ("driver = {SQL Server}; server =", sname , ODBC driver connect (Paste ("driver = {SQL Server}} server =", in snam, ODBC connection failed   

but same code window I'm using RStudio on Windows Linux / Ubuntu

  & gt; Library ("RODBC", lib.loc = "~ / / / win-library / 3.1 ") when using the command prompt> & gt; & gt; Sn & lt; -" BLAH "& gt; dbname & lt; -" BB "& gt; dbhandle & lt; - odbcDriver Connect (" Driver = {SQL Server}; server = ", snm,"; database = ", dbname,"; trusted_connection =, SEP = ""))    

I went to the issue and resolved it between the windows amendment and following Bus version:

windows:

  dbhandle & lt; -  

> Dbhandle & lt; - odbcDriverConnect (Paste ("driver = SQL Server; server =", ...

The difference is simply to declare the driver, without the unconscious braces and < Search for an explanation of how why still works between code> SQL and server

.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -