EVOLUTION-MANAGER
Edit File: dbCanConnect.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Check if a connection to a DBMS can be established</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for dbCanConnect {DBI}"><tr><td>dbCanConnect {DBI}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Check if a connection to a DBMS can be established</h2> <h3>Description</h3> <p>Like <code><a href="dbConnect.html">dbConnect()</a></code>, but only checks validity without actually returning a connection object. The default implementation opens a connection and disconnects on success, but individual backends might implement a lighter-weight check. </p> <h3>Usage</h3> <pre> dbCanConnect(drv, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>drv</code></td> <td> <p>an object that inherits from <a href="DBIDriver-class.html">DBIDriver</a>, or an existing <a href="DBIConnection-class.html">DBIConnection</a> object (in order to clone an existing connection).</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>authentication arguments needed by the DBMS instance; these typically include <code>user</code>, <code>password</code>, <code>host</code>, <code>port</code>, <code>dbname</code>, etc. For details see the appropriate <code>DBIDriver</code>.</p> </td></tr> </table> <h3>Value</h3> <p>A scalar logical. If <code>FALSE</code>, the <code>"reason"</code> attribute indicates a reason for failure. </p> <h3>See Also</h3> <p>Other DBIDriver generics: <code><a href="DBIDriver-class.html">DBIDriver-class</a></code>, <code><a href="dbConnect.html">dbConnect</a>()</code>, <code><a href="dbDataType.html">dbDataType</a>()</code>, <code><a href="dbDriver.html">dbDriver</a>()</code>, <code><a href="dbGetInfo.html">dbGetInfo</a>()</code>, <code><a href="dbIsReadOnly.html">dbIsReadOnly</a>()</code>, <code><a href="dbIsValid.html">dbIsValid</a>()</code>, <code><a href="dbListConnections.html">dbListConnections</a>()</code> </p> <h3>Examples</h3> <pre> # SQLite only needs a path to the database. (Here, ":memory:" is a special # path that creates an in-memory database.) Other database drivers # will require more details (like user, password, host, port, etc.) dbCanConnect(RSQLite::SQLite(), ":memory:") </pre> <hr /><div style="text-align: center;">[Package <em>DBI</em> version 1.1.0 <a href="00Index.html">Index</a>]</div> </body></html>