I have an R shiny application that works locally but when I upload it I get the error:
first argument is not an open RODBC channel
Here is my code:
conn<- suppressWarnings( odbcDriverConnect('driver={SQL Server};server=SWDCH; database=GR; trusted_connection=yes;uid=RUser , pwd=ruser'))
data <- sqlQuery(conn,paste("exec Performance @MetricType = '", MetricType ,"',@Metric = '", Metric ,"', @Market = '", Market , "', @StartDate = '", StartDate, "', @EndDate = '", EndDate, "';",sep =""),errors=FALSE)
I think the issue is with the conn object but any idea what the issue is?