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!?

i have faced similar issue recently can you help me with that. it says pg_hba.conf file not found in rconnect server. the shiny dashboard connect to postgres datbase

Hi @vbelex ! Welcome to the RStudio Community!

I have to admit I am having a hard time understanding your issue. Would you mind explaining what you are doing when you see the error, and copying / pasting the error message here? If there are screenshots without sensitive information that you can share, that may give us a better sense for what is happening, too!