HI:
Is it possible to use the RODBC package within MS Access. I have been using 
from R but was just wondering if it could be used along with R(D)COM. Something 
like this:

Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim myApp As StatConnector
Set myApp = New StatConnector
myApp.GetErrorText
myApp.Init "R"

myApp.EvaluateNoReturn "library(RODBC)"
myApp.EvaluateNoReturn "myDB <- odbcConnectAccess(CurrentDb)"
'query the database and save it as R object 'a'
myApp.EvaluateNoReturn "a <- sqlQuery(CurrentDb, Paste(""select * From 
Sample""))"
myApp.EvaluateNoReturn "plot(a)"

Thanks in advance


Felipe D. Carrillo  
Supervisory Fishery Biologist  
Department of the Interior  
US Fish & Wildlife Service  
California, USA

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to