\Header{dbConnect-methods}{Create a connection object to an SQLite DBMS}
\alias{dbConnect,character-method}{dbConnect-methods}
\alias{dbConnect,SQLiteConnection-method}{dbConnect-methods}
\alias{dbConnect,SQLiteDriver-method}{dbConnect-methods}
\alias{dbDisconnect,SQLiteConnection-method}{dbConnect-methods}
\alias{dbDisconnect-methods}{dbConnect-methods}
\keyword{interface}{dbConnect-methods}
\keyword{interface}{dbConnect-methods}
\keyword{database}{dbConnect-methods}
\begin{Description}\relax
These methods are straight-forward implementations of the corresponding
generic functions.\end{Description}
\begin{Section}{Methods}
\describe{
\item[drv] an object of class \code{SQLiteDriver}, or
the character string "SQLite" or an \code{SQLiteConnection}.

\item[conn] an \code{SQLiteConnection} object as produced by \code{dbConnect}.

\item[\dots ] In the case of SQLite all you need is \code{dbname}, which
should refer to a file name.

}\end{Section}
\begin{Section}{Side Effects}
A connection between R/S-Plus and the embeddable SQLite server is 
established.  Note that since the SQLite is embedded in R/S-Plus,
connections are not too resource hungry.

SQLite connections only require the file name where the SQLite
database reside.  For details see \code{\Link{SQLite}}.\end{Section}
\begin{References}\relax
See the Database Interface definition document
\code{DBI.pdf} in the base directory of this package
or \url{http://developer.r-project.org/db}.\end{References}
\begin{SeeAlso}\relax
\code{\Link{SQLite}},
\code{\Link{dbConnect}},
\code{\Link{dbSendQuery}},
\code{\Link{dbGetQuery}},
\code{\Link{fetch}},
\code{\Link{dbCommit}},
\code{\Link{dbGetInfo}},
\code{\Link{dbReadTable}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
# create an SQLite instance and create one connection.
drv <- dbDriver("SQLite")

# open the connection using user, passsword, etc., as
con <- dbConnect(drv, dbname = "sqlite.db")

# Run an SQL statement by creating first a resultSet object
rs <- dbSendQuery(con, statement = paste(
                      "SELECT w.laser_id, w.wavelength, p.cut_off",
                      "FROM WL w, PURGE P", 
                      "WHERE w.laser_id = p.laser_id", 
                      "SORT BY w.laser_id")
# we now fetch records from the resultSet into a data.frame
data <- fetch(rs, n = -1)   # extract all rows
dim(data)

\end{ExampleCode}
\end{Examples}

