Updating PostgreSQL is working via RStudio Server Pro but not via Rstudio connect

Hello,

I've made an app using Rstudio server Pro that updates user input from a text box to a PostgreSQL database. I've tested several times and it's working well. However, after I publish the app via Rstudio Connect, it's not writing to the database. There are no errors shown in the logs.
Here is function I'm using:

updateDB <- function(editedValue, id, field, pool, tbl){
  conn <- poolCheckout(pool)
  id = id
  col = field
  value = editedValue
  
  query <- glue::glue_sql("UPDATE {`tbl`} SET
                          {`col`} = {value}
                          WHERE runid = {id}
                          ", .con = conn)
  
  dbExecute(conn, sqlInterpolate(ANSI(), query))
  
  poolReturn(conn)
  return(invisible())
}

Please suggest how to troubleshoot and resolve this issue.

Thank you

This topic was automatically closed 54 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.

Hello @shinystone! Thanks so much for reaching out here, and apologies we missed your message!

Are you still encountering issues with this, or did you figure it out!?