I would like to use several jdbc connections to different MSSQL databases. In order to be able to "loop" through all databases connected, I was trying to set up the jdbc connectors as a list.
conn <- list ()
conn[1] <- dbConnect(drv_mssql,"jdbc:sqlserver://server1","USER","PASSWORD")
conn[2] <- dbConnect(drv_mssql,"jdbc:sqlserver://server2","USER","PASSWORD")
but...
I am not able to use conn[1] in the query statement
table <- dbGetQuery(conn[1],query_string)
The error message is: unable to find an inherited method for function ‘dbGetQuery’ for signature ‘"list", "character"’
Does anybody has an idea for me to get this done ?
Thank you very much in advance
Jürgen