append_data: Append data-frame to Access table

View source: R/populate_template.R

append_dataR Documentation

Append data-frame to Access table

Description

This function will attempt to append data contained in a data-frame to a table in the target database. If verbose=TRUE, a statement including the number of records effected will be reported to the console.

Usage

append_data(
  dbase,
  trg_table,
  data,
  verbose = T,
  verbose_sqlsave = F,
  append = T,
  safer = T
)

Arguments

dbase
  • path to our target database

trg_table
  • the table in the target data to insert data into

data
  • data-frame to append in the target table

verbose
  • should the number of records and table be printed?

verbose_sqlsave
  • Boolean. Default=FALSE. This value is passed through to RODBC::sqlsave. Set to True to see all of the sql statements passed to target database. Useful for debugging.

append
  • append to and existing table, or drop and create it?

safer
  • passed to RODBC::sqlSave

Value

status of closed RODBC connection.

Author(s)

Adam Cottrill adam.cottrill@ontario.ca


AdamCottrill/glfishr documentation built on Aug. 9, 2024, 5:47 p.m.