[英]RODBC with shiny error
我想連接到在textInput中引入URL的Access數據庫。
服務器代碼如下:
function(input, output) {
dataframe <- eventReactive(input$do, {
db <- renderPrint({ input$text })
con <- odbcConnectAccess(db())
info <- sqlTables(channel = con, tableType = "TABLE")$TABLE_NAME
info
})
output$table <- renderTable({
dataframe()
})
}
我得到以下錯誤:
Error: first argument is not an open RODBC channel
我在當地做。
謝謝
正如本傑明所說:
server.R
function(input, output) {
dataframe <- eventReactive(input$do, {
con <- odbcConnectAccess(input$text)
info <- sqlTables(channel = con, tableType = "TABLE")$TABLE_NAME
info
})
output$table <- renderTable({
dataframe()
})
}
input $ text是Access DDBB的文件路徑。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.