How can I update changes in a Table (rhandsontable package) to a PostgreSQL database?

I have a very simple shiny App, where I Just display a Table (rhandsontable) with some values. The table is connected to a PostgreSQL database. I just need to know, how can I update the Table to the database. So when I edit the table in the shiny App, I want the database to be updated and when I call the shiny App, it should obviously display the updated values, new rows, etc. I am very new to programming in general, but I think this should be very simple. I read a bit about "CRUD" and this should be the way to do it, but I have no Idea how to write the code.

library(RJDBC)
library(rJava)
library(DBI)
library(rhandsontable)
library(shiny)

drv <- JDBC(...)

conn <- dbConnect(drv, host, user, password)

dbListTables(conn)
table = dbReadTable(conn, "db_table")

ui <- fluidPage(
  fluidRow(rHandsontableOutput("hot")))

server <- function(input, output, session){
  
  output$hot <- renderRHandsontable({
   rhandsontable(table)
  })

shinyApp(ui, server)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.