title: RODBC odbcDriverConnect() Connection Error in shiny R but not in Rstudio
body: <p>I'm trying to use</p>
  
  <pre><code>odbcDriverConnect("driver={SQL 
  Server};server=IP;database=DBNAME;uid=username;pwd=password")
  </code></pre>
  
  <p>to connecting sql server database from shiny R,
  but its result is -1.
  I run the same code in R studio and get results normally, what's the problem?</p>
  
  <p>For testing more I tried this one:</p>
  
  <pre><code> con &lt;- dbConnect(odbc::odbc(),
               Driver = "SQL Server",
               Server = "IP",
               Database = "dbname",
               UID = "username",
               PWD ="password",
               Port = Port)
  </code></pre>
  
  <p>But again it runs in R studio but not in shiny and gets this error:</p>
  
  <pre><code> nanodbc/nanodbc.cpp:950: IM002: [unixODBC][Driver Manager]Data source name 
   not found, and no default driver specified 
  </code></pre>