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