hsFields | R Documentation |
Returns a vector containing the field names of a database table.
hsFields(
mdb,
tbl,
namesOnly = TRUE,
chopDollar = TRUE,
ignore.case = (!isMySQL(mdb, use2007Driver = use2007Driver)),
use2007Driver = NULL,
dbg = FALSE
)
mdb |
full path to MS Access database file (extension “.mdb” or “.accdb”) or MS Excel file (extension “.xls” or “.xlsx”). |
tbl |
table name. |
namesOnly |
if TRUE, only field names are returned, otherwise all available information on the fields. Default: TRUE |
chopDollar |
if TRUE (default), a dollar sign at the end of the table
name is removed before sending it to |
ignore.case |
if TRUE, case is ignored when comparing the given table with the names of the existing tables. Default: FALSE |
use2007Driver |
passed to |
dbg |
if TRUE, debug messages are shown |
Vector containing the field names of the database table (if namesOnly = TRUE) or data.frame with columns COLUMN_NAME, DATA_TYPE, TYPE_NAME, COLUMN_SIZE, BUFFER_LENGTH, DECIMAL_DIGITS, NUM_PREC_RADIX, NULLABLE describing the database fields in detail, otherwise.
hsTables
## Not run:
## List the fields of table "tbl_Hyd" in the example database
## (only on Windows!)
if (.Platform$OS.type == "windows") {
setCurrentSqlDialect("msaccess")
fields <- hsFields(xmdb(), "tbl_Hyd")
fields
}
## Ouput:
# [1] "Zeitst" "Q" "v" "H" "T_Kanal"
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.