sqrlSources: List Data Sources and their Interfaces

View source: R/SQRL.R

sqrlSourcesR Documentation

List Data Sources and their Interfaces

Description

Returns a summary of defined data sources. These will consist of system and user DSNs, plus any additional sources defined via sqrlSource.

Usage

sqrlSources(...)

Arguments

...

An optional character string. If set to one of “all”, “user”, or “system”, then a call is made to RODBC::odbcDataSources (with the corresponding type value) to re-examine that class of data source names (DSNs) and import all those found. If set to “remove”, then all currently defined sources are deregistered.

Value

Returns a data frame of data source details.

Note

The return frame may have zero rows, if no data sources are defined.

Sources need only to have been defined; they need not actually exist.

DSNs with “Access”, “dBASE”, or “Excel” in their names are not automatically imported. They can be manually added via sqrlSource.

See Also

sqrlInterface, sqrlSource

Examples

# Review defined sources.
sqrlSources()

## Not run: 
# Sample sqrlSources() output:

   name interface open                     driver
1 chaos     chaos    N       PostgreSQL ANSI(x64)
2 order      <NA>    N MySQL ODBC 5.3 ANSI Driver

# Here, there are two data sources; 'order' and 'chaos'.
# The interface to 'chaos' is a function of the same name.
# No interface has yet been defined for 'order' (use of
# that name is prevented due to its conflicting with the
# base::order function). Neither source (channel) is open.

## End(Not run)

# Remove all sources.
sqrlSources("remove")

# Reload user DSNs.
sqrlSources("user")

SQRL documentation built on Sept. 21, 2022, 9:13 a.m.