Changes between Version 6 and Version 7 of Cookbook ODBC
- Timestamp:
- Jan 23, 2010 3:28:18 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Cookbook ODBC
v6 v7 11 11 [[BR]][[BR]][[Image(source:EDA/data/Docs/trac/RODBC.jpg)]][[BR]][[BR]] 12 12 [[Image(source:EDA/data/Docs/trac/RODBC2.jpg)]][[BR]][[BR]] 13 the Data Source name will indicate your ODBC connection used in R (the one used in the xml file) 13 The '''Data Source''' name will indicate your '''ODBC connection''' used in R (in the xml file as shown below). 14 14 Test your connector, it should return connection successfull. If not check that your port is 5432 (it can be different if you have installled several postgres servers). 15 15 Check also that your usernames and passwords are correct. … … 35 35 Load init.r 36 36 ''note : you are supposed to put the xml file where the R program can directly load it. In the case of EDA you will be at the root of the EDA project. In Eclipse, a variable working directory allows to start R directly at the right location.'' 37 to test your connection write 38 {{{ 39 library(RODBC) 40 odbcConnect(dsn=baseODBC[1],uid=baseODBC[2],pwd=baseODBC[3]) 41 > RODBC Connection 4 42 > Details: 43 > case=tolower 44 > ... 45 }}} 46 The possible commands for RODBC are 47 {{{ 48 help.search("ODBC") #returns the following 49 RODBC::odbcUpdate Internal RODBC functions 50 RODBC::RODBC ODBC Database Connectivity 51 RODBC::odbcQuery Low-level ODBC functions 52 RODBC::odbcClose ODBC Close Connections 53 RODBC::odbcConnect ODBC Open Connections 54 RODBC::odbcDataSources 55 List ODBC Data Sources 56 RODBC::odbcGetInfo Request Information on an ODBC Connection 57 RODBC::odbcSetAutoCommit 58 ODBC Set Auto-Commit Mode 59 RODBC::sqlPrimaryKeys Query Column Structure in ODBC Tables 60 RODBC::sqlCopy ODBC Copy 61 RODBC::sqlDrop Deletion Operations on Tables in ODBC databases 62 RODBC::sqlFetch Reading Tables from ODBC Databases 63 RODBC::sqlQuery Query an ODBC Database 64 RODBC::sqlSave Write a Data Frame to a Table in an ODBC 65 Database 66 RODBC::sqlTables List Tables on an ODBC Connection 67 RODBC::sqlTypeInfo Request Information about Data Types in an ODBC 68 }}} 37 69 38 70