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.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to