odbcConnect: ODBC Open and Close
Description
Open and close ODBC databases.Usage
odbcConnect(dsn, uid="", pwd="", host="localhost", case="nochange")
odbcClose(channel)
Arguments
dsn
character. A registered data source name.
uid, pwd
UID and password for authentication (if required).
host
Hostname of the database server
case
Controls case changes for different RDBMS engines
channel
connection handle returned by odbcConnect
.
Value
odbcConnect
establishes a
connection to the dsn at host
. It returns a non-negative
integer, which is used as handle if no error occurred, -1 otherwise.
Details
odbcConnect
establishes a
connection to the dsn at host
. For databases that
translate table and column names to case must be set as appropriate.
Allowable values are nochange
, toupper
and tolower
as well as the names of databases where the behaviour is known to us
(currently mysql
,postgresql
, oracle
and
msaccess
).
odbcClose
cleans up and frees resources. It returns 0 on
success and -1 on failure.