dbConnect-methods          package:ROracle          R Documentation

_C_r_e_a_t_e _a _c_o_n_n_e_c_t_i_o_n _o_b_j_e_c_t _t_o _a_n _O_r_a_c_l_e _D_B_M_S

_D_e_s_c_r_i_p_t_i_o_n:

     These methods are straight-forward implementations of the
     corresponding generic functions.

_M_e_t_h_o_d_s:

     _d_r_v an object of class 'OraDriver', or the character string
          "Oracle" or an 'OraConnection'.

     _c_o_n_n an 'OraConnection' object as produced by 'dbConnect'.

     _u_s_e_r_n_a_m_e string of the Oracle login name.

     _p_a_s_s_w_o_r_d string with the Oracle password.

     _d_b_n_a_m_e string with the Oracle SID, System Identification 
          (database name). The default takes this fromt the 
          environment variable 'ORACLE_SID'.

     ...  Must specify user, password and optionally dbname.  Also you
          may specify an Oracle connection string, e.g., 
          "user/password@SID".

_S_i_d_e _E_f_f_e_c_t_s:

     A connection between R/S-Plus and an Oracle  server is 
     established.   The current implementation supports up to 10
     simultaneous connections.

_R_e_f_e_r_e_n_c_e_s:

     See the Database Interface definition document 'DBI.pdf' in the
     base directory of this package or <URL:
     http://stat.bell-labs.com/RS-DBI>.

_S_e_e _A_l_s_o:

     'Oracle', 'dbConnect', 'dbSendQuery', 'dbGetQuery', 'fetch',
     'dbCommit', 'dbGetInfo', 'dbReadTable'.

_E_x_a_m_p_l_e_s:

     ## Not run: 
     # create an Oracle instance and create one connection.
     drv <- dbDriver("Oracle")

     # open the connection using user, passsword, etc., as
     con <- dbConnect(drv, "user/password@dbname")

     # 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(Not run)

