search for: odbcconnectaccess

Displaying 20 results from an estimated 49 matches for "odbcconnectaccess".

2009 Apr 30
1
odbcConnectAccess function
...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 B...
2010 Jul 15
6
Error cargar datos ACCESS
Hola a todos, estoy intentendo cargar unos datos contenidos en una tabla de ACCESS, por lo que ejecuto los siguientes comandos dir<-"C:/Users/D/Desktop/" library(RODBC) cn<-odbcConnectAccess(paste(dir1,"datos.mdb",sep="")) pero me da el siguiente error Warning messages: 1: In odbcDriverConnect(con, ...) : [RODBC] ERROR: state IM002, code 0, message [Microsoft][Administrador de controladores ODBC] No se encuentra el nombre del origen de datos y no se especificó...
2010 Mar 10
1
Importing Access 2007 data with ROBC
...db extension). However, lovely Microsoft must constantly update their software. Modern Access files have an .ACCDB extension. I cannot seem to coerce R to import data from such a file. Any advice? I've been using this code: testdb <- file.path("c:/Salmon_data.mdb") channel <- odbcConnectAccess(testdb) Data <- sqlFetch(channel,"Table1") When I replace it with an Access 2007 file: testdb <- file.path("c:/Salmon_data.accdb") channel <- odbcConnectAccess(testdb) Data <- sqlFetch(channel,"Table1") it does not work. Thanks for any help! Ryan Utz
2015 Apr 27
2
Como conectar R con una base de datos Access en Windows 64-bit (RODBC package)
Hola a tod en s, Tengo un problema a la hora de conectar una base de datos (*.mdb) de Access a RStudio utilizando windows 64-bit. Con el paquete RODBC utilizo el siguiente script que devuelve el error que indico: mdbConnect <- odbcConnectAccess("C:/Users/database.mdb") Error in odbcConnectAccess("C:/Users/Isa/FPI-AZTI/JUVENA/Databases/MEGASCOPE_JUVENA2014.mdb") : odbcConnectAccess is only usable with 32-bit Windows He probado también con el siguiente, pero de nuevo sin éxito: mdb <- odbcDriverConnect("Driv...
2007 Aug 14
4
Import of Access data via RODBC changes column name ("NO" to "Expr1014") and the content of the column
...month 06 day 27 svn rev 42083 language R version.string R version 2.5.1 (2007-06-27) ## code get.table <- function(name, db, drop = NULL){ .con <- try(odbcConnectAccess(db), silent = T) if(!inherits(.con, "RODBC")) return(.con) ## exclude memo columns .t <- try(sqlColumns(.con, name)) if(inherits(.t, "try-error")){close(.con); return(.t)} .t <- .t[.t$"COLUMN_SIZE" < 255, "COLUMN_NAME"] .t <- paste(.t,...
2006 Oct 18
2
sqlSave, fast=F option, bug?
Hi, Using the fast=F option, sqlSave saves without matching column names. It looks like a bug to me.......... Here's a simple (artificial) example. ----------------------------------------- Create a dataframe and save it to a database table "test" as follows: df <- data.frame(T=1, S=10) sqlSave(channel, df, "test", rownames=F) The table now looks like T S 1 10 If
2007 Jan 30
0
calloc bug in RODBC 1.1-7 and later?
...RODBC Version: 1.1-4 Date: 2005-08-04 R Version 2.3.0 (2006-04-24) or R version 2.4.1 (2006-12-18) Package: RODBC Version: 1.1-6 Date: 2006-04-04 > library("RODBC") > channel <- > odbcConnectAccess("S:/Bioinformatics/Software/Affy/Data/MOE430A/MOE430A.mdb") > moe430a <- sqlFetch(channel,"Annotation", as.is=TRUE) > odbcClose(channel) > dim(moe430a) [1] 22690 43 = = = = = = = = = = calloc bug in RODBC 1.1-7 and later? R Version 2.3.1 (2006-06-01...
2012 Jul 11
2
How to connect .mdb file
Hi, I'm currently having some problem connect .mdb file into R. I've installed the RODBC packages and I do the code this way: channel <- odbcConnectAccess("C:/Users/Documents/XYZ") channel and it gave me this : RODBC Connection 3 Details: case=nochange DBQ=C:\USers\JieYi\Documents\NYP\IPP\GCR Driver={Microsoft Access Driver (*.mdb)} DriverId=25 FIL=MS Access MaxBufferSize=2048 PageTimeout=5 UID=admin I have a total of 5 tables in the .mdb...
2007 Nov 13
2
Query an Access database based on a date attribute (Tudor Bodea)
Tudor Bodea asked: >In this context, I try to get all the records for which market is atl-bos, >competitor is delta and dd is 2007-11-20 (first record above). To do this I used >># channel <- odbcConnectAccess("test.mdb") >>res <- sqlQuery(channel, "select * from test_table where market = 'atl-bos' >>and competitor = 'delta' and dd = 2007-11-20") >Does any of you know what it is going on? Try this: res <- sqlQuery(channel, "select * from te...
2018 Feb 15
3
help (Crear bucle para generar un dataframe a partir de datos .mdb)
...les. Quiero armar un dataframe que contenga todas las bases de datos (1995 a 2014) y todas las tablas (tabla 1 a tabla 3). He podido generar un dataframe que me une las 3 tablas para un año (por ej. 2014) del siguiente modo. library(RODBC) setwd("C:/Users/M/Documents/R data/") base<-odbcConnectAccess("2014") datos1<-sqlQuery(base ,"SELECT * FROM TABLA1_2014") datos2<-sqlQuery(base ,"SELECT * FROM TABLA2_2014") datos3<-sqlQuery(base , "SELECT * FROM TABLA3_2014") base1<-Reduce(function(...) merge (...,by="ID", all=T), list(datos1,dato...
2006 Mar 23
0
sqlSave
Dear Tobias, I finally succeeded in exporting my dataframes from R into Access with this script: library(RODBC) canal <- odbcConnectAccess("D:/Floristique.mdb") sqlSave(channel=canal, dat=flore, tablename="Floristique", rownames=F, safer=F, fast=F, varTypes=c(dates="Date")) odbcClose(canal) My problem in exporting my dataframe "flore" seems to be closely linked with the name of the col...
2012 Nov 26
2
puzzling RODBC error
...ase). I keep getting an error about the channel when using sqlQuery(). However, sqlTables() does not complain about the channel and lists all tables in the database. If I try sqlFetch(), then R crashes. I'm happy to hear suggestions on how to solve this. Best regards, Thierry > MDB <- odbcConnectAccess("//inbodata/indata/Projects/PRJ_Watervogels/Geoloket/Telgebieden watervogeltellingen/Watervogellocaties_copy.mdb") > sqlQuery(channnel = MDB, "SELECT gebiedscode FROM ganzengebieden;") Error in sqlQuery(channnel = MDB, "SELECT gebiedscode FROM ganzengebieden;") :...
2006 Mar 18
1
The R "fork"
Hello, I would like to call a function that can take infinite time to be executed in some circumstances (which can not be easily detected). So, I would like that once the function is being executed for more than two seconds it is stopped. I have found documentation for timers but i did not found how to "kill" a function. Moreover, I would like not to change the function code (it should
2007 Nov 12
2
Query an Access database based on a date attribute
...007-11-20 340 11 11 2007-11-20 atl-sfa aa 2007-11-21 320 12 12 2007-11-20 atl-sfa aa 2007-11-22 300 In this context, I try to get all the records for which market is atl-bos, competitor is delta and dd is 2007-11-20 (first record above). To do this I used ># channel <- odbcConnectAccess("test.mdb") >res <- sqlQuery(channel, "select * from test_table where market = 'atl-bos' and competitor = 'delta' and dd = 2007-11-20") but the result seems to be incorrect. > res [1] ID cd market competitor dd price <0 r...
2007 Jul 13
1
RODBC Access
Dear R users, I am trying to connect an Access database. The code I use is : channel<-odbcConnectAccess("Base") table.db<-sqlFetch(Base,"table",colnames=T) When I look at the table in R, the table imported lacks the first 41 lines, and the column names are the values of the 42nd record. Any hints ? I am working on a WinXP pro 5.1 box, R 2.5-0 compiled from source using MINGW...
2009 May 09
1
sqlSave()
Hi all: I have created a MS Access table named 'PredictedValues' through the statement below: myDB <- odbcConnectAccess("C:/Documents and Settings/Owner/Desktop/Rpond Farming.mdb",uid="admin",pwd="") sqlSave(myDB,PredictedValues,rownames=FALSE) close(myDB) But if I run the code again with new values I get the message below: Error in sqlSave(myDB, PredictedValues, rownames = FALSE)...
2011 Dec 07
1
import a dataset from Access database into R
Hi I was trying to import a dataset from access database into R My code looks like below >library(RODBC) >setwd("//STATESFPSOP1/docs/CRMPO/DEPT/Retail PD") >channel<-odbcConnectAccess("MortgagePD.mdb") >Mdata<-sqlFetch(channel, "MortgagePD") But I got error messages saying Error: cannot allocate vector of size 27.9 Mb In addition: Warning messages: 1: In names(value) <- make.unique(colnames) : Reached total allocation of 1535Mb: see help(mem...
2010 Oct 22
1
RODBC: data base with decimal point ","
...le "testtable" (in an Access data base) with 3 columns and 1 row that looks like this: X Y Z 0012345 42 42,1 The columns are of these types: X - character, Y - Long Integer, Z - Decimal. I use RODBC to get these data into R: > library(RODBC) > channel <- odbcConnectAccess("C:\\temp\\testdb.mdb") > x <- sqlFetch(channel, "testtable", as.is = TRUE) # need as.is so that X won't be converted to numeric > summary(x) X Y Z Length:1 Min. :42 Length:1 Class :character 1st Qu.:42 Class :ch...
2012 Feb 24
1
looping over string of frames when importing with 'sqlFetch' from a Microsoft Access database
...rom stata) I would very much appreciate if anyone on the list could help me solve this problem, as it is an issue of connecting to a database I can't really make a working example, please bear with me. ### not-working R code ### ##?first I establish a connection to my database mdbConnect<-odbcConnectAccess("C:\\... \\database.mdb") ## then I read of all the table names stringTables <- sqlTables(mdbConnect, tableType=c("TABLE"))$TABLE_NAME ## and then I meet the wall ... for(i.Frame in stringTables) { ?? ?i.Frame <- sqlFetch(mdbConnect, i.Frame) } ## this broken loop create...
2010 Nov 25
1
RODBC
...the RODBC examples form the help guide. I am trying to UPDATE a table in an Access data base but I am having an error. library(RODBC) library(termstrc) path = getwd() setwd(getwd()) dbName = "data.mdb" pathdbname = paste(path,"/",dbName,sep="") accesChannel = odbcConnectAccess(pathdbname, uid = "", pwd = "") sqlSave(accesChannel, USArrests, rownames = "state", addPK=TRUE) sqlFetch(accesChannel , "USArrests", rownames = "state") # get the lot foo <- cbind(state=row.names(USArrests), USArrests)[1:3, c(1,3)] foo[1:3,2] &...