[R] R connection with sql server 2005

vikrant vikrant.shimpi at tcs.com
Fri Feb 12 13:50:06 CET 2010


Hi all,
Problem is solved.

The solution is I needed to pass the whole string "driver=SQL Server;server=
01hd166373" as a parameter and not only the servername.

my<-function(servername,dbname,dbtable){ 
  library(RODBC) 
  channel<- odbcDriverConnect(paste(servername) 
  init_data<- sqlQuery(channel,paste("select * from",dbname,"..",dbtable) 
} 

my("driver=SQL Server;server= 01hd166373",test_db,test_vikrant)

Cheers,
Vikrant.
-- 
View this message in context: http://n4.nabble.com/R-connection-with-sql-server-2005-tp1478145p1478484.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list