hsSetForeignKey: Set Foreign Key for Table Field

View source: R/hsSetForeignKey.R

hsSetForeignKeyR Documentation

Set Foreign Key for Table Field

Description

Set foreign key constraint for a table field

Usage

hsSetForeignKey(
  mdb,
  tbl,
  field,
  ref.tbl,
  ref.field,
  key.name = .getForeignKeyName(tbl, field, ref.tbl, ref.field),
  dbg = FALSE
)

Arguments

mdb

full path to MS Access database file (*.mdb)

tbl

name of table containing the field for which the foreign key constraint is to be defined

field

name of table field for which the foreign key constraint is to be defined

ref.tbl

name of table containing the referenced foreign key field

ref.field

name of foreign key field in ref.tbl

key.name

optional. Name to be given to the foreign key

dbg

passed to hsSqlQuery


KWB-R/kwb.db documentation built on Oct. 1, 2023, 4:10 a.m.