odbc                  package:RODBC                  R Documentation

_L_o_w-_l_e_v_e_l _O_D_B_C _f_u_n_c_t_i_o_n_s

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

     R functions which talk directly to the ODBC interface.

_U_s_a_g_e:

     odbcTables(channel)

     odbcColumns(channel, table)
     odbcPrimaryKeys(channel, table)

     odbcQuery(channel, query)
     odbcFetchRows(channel, max = 0, buffsize = 1000, nullstring = NA,
                   believeNRows = TRUE) 

_A_r_g_u_m_e_n_t_s:

 channel: connection handle as returned by 'odbcConnect()' of class
          '"RODBC"'.

   query: any valid SQL statement

   table: a database table name accessible from the connected dsn. This
          can be either a character string or an (unquoted) symbol.

     max: limit on the number of rows to fetch, with 0 indicating no
          limit.

buffsize: the number of records to be transferred at a time.

nullstring: character string to be used when reading 'SQL_NULL_DATA'
          items from the database. 

believeNRows: logical.  Is the number of rows returned by the ODBC
          connection believable?  Not true for Oracle, apparently.

_D_e_t_a_i_l_s:

     'odbcFetchRows' returns a data frame of the pending rowset in
     '$data' limited to 'max' rows if 'max' is greater than 0. 
     'buffsize' may be increased from the default of 1000 rows for
     increased performance in a large dataset. This only has an effect
     with servers that do not return the number of rows affected by a
     query e.g. MS Access, MS SQLServer.

_V_a_l_u_e:

     Most return '1' on success and '-1' on failure, indicating that a
     message is waiting for 'odbcGetErrMsg'. 'odbcFetchRows' may return
     '-2' indicating '"No Data"', the message that would be returned by
     'odbcGetErrMsg'.

_A_u_t_h_o_r(_s):

     Michael Lapsley and Brian Ripley

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

     'sqlQuery', 'odbcConnect', 'odbcGetErrMsg'.

