title: Error in sqliteSendQuery(con, statement, bind.data) : expired SQLiteConnection
body: <p>I am trying to build a shiny application, with the first Drop down menu populated from a SQLite using renderUI. </p>
  
  <p>Below is my server.r</p>
  
  <pre><code>library("shiny")
  library("RSQLite")
  
  shinyServer(function(input, output) {
  
  
  db&lt;-dbConnect(SQLite(),"PNL.sqlite")
  
  
  origins&lt;-data.frame(dbGetQuery(db,"SELECT Origin_Name from CNS_Origin_List"))
  
  output$origin&lt;-renderUI({
    selectInput(inputId = "origin",label = "Select Origin",choices = origins$Origin_Name)
  })
  
  
  query&lt;-reactive({
                   sql&lt;-dbGetQuery(db,paste0('SELECT Region_Name from CNS_Origin_List Where Origin_Name ="',input$origin,'"'))
  })
  
  
  
  
  
  #This is where the error occurs when I call the query()
  output$region&lt;-renderTable(query())
  
  
  dbDisconnect(db)
  })
  </code></pre>
  
  <p>Here is my ui.R</p>
  
  <pre><code>library(shiny)
  
  # Define UI for application that draws a histogram
  shinyUI(fluidPage(
  
    # Application title
    titlePanel("PNL Calculator!"),
  
    # Sidebar with a slider input for the number of bins
    fluidRow(
      column(4,
             wellPanel(
               uiOutput(outputId = "origin"))),
  
      column(6,
             wellPanel(
               tableOutput(outputId = "region"),
  
             )
             )
      )
  
  ))
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Ojgho.png" alt="here is the dropdown of origins"></p>
  
  <p>I get </p>
  
  <pre><code>Error in sqliteSendQuery(con, statement, bind.data) : 
    expired SQLiteConnection
  </code></pre>
  
  <p>Not sure where I am going wrong. Please help</p>