闪亮的应用程序在本地工作,但不在shinyapps.io上

时间:2017-12-05 07:44:45

标签: r shiny shiny-server

我已经使用sql server连接创建了这个应用程序并且它在我的设备上正常工作但是在发布后我收到此错误应用程序无法启动,这就是我在此错误页面中得到的内容:

    Attaching package: ‘rsconnect’

The following object is masked from ‘package:shiny’:

    serverInfo


Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union


Attaching package: ‘RODBCext’

The following objects are masked from ‘package:RODBC’:

    odbcFetchRows, sqlFetchMore


Attaching package: ‘shinydashboard’

The following object is masked from ‘package:graphics’:

    box

Warning in odbcDriverConnect("driver={SQL Server};server=************;database=*******;uid=****;pwd=*****") :
  [RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver Manager]Data source name not found, and no default driver specified
Warning in odbcDriverConnect("driver={SQL Server};server=************\\.,1435;database=************;uid=****;pwd=****") :
  ODBC connection failed
Error in value[[3L]](cond) : first argument is not an open RODBC channel
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted

我的代码将在这里: my app code

1 个答案:

答案 0 :(得分:-1)

我使用 dbConnect&amp; amp;解决了这个问题。 DBI 库而不是RODBC并使用RSQLServer::SQLServer()在sql server上打开连接。我感谢@PorkChop给我一个帮助。