Bureaucrats, cc_docs_admin, cc_staff
2,318
edits
Line 40: | Line 40: | ||
# after which you can use code like the following to interact with the SQLite database | # after which you can use code like the following to interact with the SQLite database | ||
library(DBI) | library(DBI) | ||
age <- 34 | |||
query <- "" | |||
# Connect to the database... | # Connect to the database... | ||
Line 45: | Line 48: | ||
# A parameterized query | # A parameterized query | ||
paste(c("INSERT INTO employee(name,age) VALUES(\"John Smith\",",toString(age),");",query),collapse='') | |||
ierr <- dbExecute(dbase,query) | |||
# Close the database connection | # Close the database connection |