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