Description Usage Arguments Value References Examples
SQLServer()
creates a SQLServerDriver
object and is based on
the jTDS driver while dbConnect()
provides a convenient interface to
connecting to a SQL Server database using this driver.
1 2 3 4 5 |
drv |
An objected of class |
server |
the server address or recognised alias thereof. |
file |
defaults to using the server details file in
|
database |
the name of the database hosted on the |
type |
the server type. Must be either |
port |
the TCP/IP default port. This will be coerced to a string.
Defaults to |
properties |
One or more
optional connection
properties. in a named list (defaults to empty list). Note if you intend
to set the |
SQLServer()
returns an object of class
SQLServerDriver
; dbConnect()
returns a
SQLServerConnection
object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
SQLServer()
## End(Not run)
# View sql.yaml file bundled in package
file <- system.file("extdata", "sql.yaml", package = "RSQLServer")
readLines(file)
# Connect using ~/sql.yaml file
## Not run:
if (have_test_server()) {
dbConnect(RSQLServer::SQLServer(), "TEST")
}
# Example where ~/sql.yaml does not exist or where the server
# is not in the YAML file.
dbConnect(RSQLServer::SQLServer(), server="11.1.111.11", port=1434,
properties=list(useNTLMv2="true", domain="myco", user="me",
password="asecret"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.