mdb-count is a utility program distributed with MDB Tools. It outputs the number of rows in a table.

mdb_count(path, table = NULL, where = NULL, version = FALSE)

Arguments

path

Path to .mdb/.accdb file.

table

Table name.

where

Optional SQL predicate appended to WHERE. This is an R-side extension and is not part of the CLI.

version

Logical; when TRUE, return mdbtools version (--version).

Value

Integer row count or version string.

Examples

db <- mdbr:::.mdb_example_nwind_path()
if (nzchar(db)) {
  mdb_count(db, "Orders")
}