dbConnect() was working properly for more than one month but now showing error

I was using this, to extract data from server

library(odbc)

db_connection <- dbConnect(odbc(), driver = "ODBC Driver 11 for SQL Server", 
                    server = "", database = "", uid = "", 
                    pwd = "")

which was working fine.
But, after I used package

library(RODBC)
connection <- odbcDriverConnect("
                                
                                driver = {ODBC Driver 11 fro SQL Server};
                                server = 12345;
                                 database = abcdef;
                                 trusted_connection = true;
                                 uid = xyz; pwd =*** ;")

sqlSave(connection,dataframe,tablename="table1",rownames = FALSE)

which by the way did not work. Showing Error


[RODBC] ERROR: state IM002, code 0, message [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

but after that the previous connection "db_connection" is also not working. It is now giving error

Error: nanodbc/nanodbc.cpp:950: 08001: [Microsoft][ODBC Driver 11 for SQL Server]TCP Provider: Timeout error [258].  

I also closed the "db_connection" from Connection tab before executing "connection"

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.