Desktop Survival Guide
by Graham Williams


MS/Access databases, on MSWindows, can be directly accessed through ODBC with an odbcConnectAccess. A database can be querired for a list of all tables available, using sqlTables, and imported with sqlFetch or sqlQuery. We can then directly save the table as an R object fo simpler loading into R at a later time:

> library(RODBC)
> channel <- odbcConnectAccess("h:/sample.mdb")
> sqlTables(channel)$TABLE_NAME
> clients <- sqlFetch(channel, "Clients")
> odbcClose(channel)
> save(clients, file="clients.RData")

Copyright © Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
The PDF version is a formatted comprehensive draft book (with over 800 pages).
Brought to you by Togaware. This page generated: Sunday, 22 August 2010