Perfect - thank you!
Got it. but now i have another issue:
I want to update two columns - it sends the sql statement to the table, when i click the button, but it doesnt show the correct values in the app itself.
observeEvent(
input$actionButton_1001,
{
con <- DBI::dbConnect(dbDriver("SQLite"),"EIS_2.sqlite")
df_sql <- DBI::dbReadTable(con, "Material")
sql_update_price <- paste0("UPDATE Material SET priceUoM = 'EUR/kg';")
sql_update_price2 <- paste0("UPDATE Material SET pricePerUnit = pricePerUnit / 100;")
DBI::dbSendStatement(conn = con, statement = sql_update_price)
DBI::dbSendStatement(conn = con, statement = sql_update_price2)
DBI::dbDisconnect(con)
output$dataTableOutput_1001 <- renderDataTable({
df_sql
},options = list(scrollX = TRUE))
output$rpivotTableOutput_1001 <- renderRpivotTable(
rpivotTable(data = df_sql, height = "100px")
)
global_df <<- df_sql
})