DBI (version 0.1-10)

dbListTables-methods: List items from a remote DBMS and from objects that implement the database interface DBI.

Description

List remote tables, fields of a remote table, opened connections and pending statements in a connection.

Usage

dbListTables(conn, ...)
  dbListFields(conn, name, ...)
  dbListConnections(drv, ...)
  dbListResults(conn, ...)

Arguments

drv
a driver object (e.g., ODBC, Oracle)
conn
a connection object
name
a character string with the name of the remote table.
...
optional arguments for the actual driver implementation.

Value

  • dbListTables returns a character vector with the names of the tables in the remote database associated with the connection in conn object.

    dbListFields returns a character vector with the names of the fields of the res result object (it must be a query statement).

    dbListConnections returns a list of all currently open connections on driver drv. Drivers that implement single connections would return the one single connection object.

    dbListResults returns a list of objects for all pending results (statements) on the conn connection.

References

See the Database Interface definition document DBI.pdf in the base directory of this package or http://developer.r-project.org/db.

See Also

dbGetInfo, dbColumnInfo, dbDriver, dbConnect, dbSendQuery

Examples

Run this code
drv <- dbDriver("RSQLite")
# after working awhile...
for(con in dbListConnections(odbc)){
   dbGetStatement(dbListResults(con))
}

Run the code above in your browser using DataCamp Workspace