i have created this app with sql server connection and its worked correctly on my device but after publishing it i get this error The application failed to start and this is what i get in this error page:
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 code will be here: my app code
I solved this problem by using dbConnect & DBI libraries instead of RODBC
and using RSQLServer::SQLServer()
to open the connection on the sql server. and i thanks @PorkChop for give me a help in that.