Displaying 20 results from an estimated 24 matches for "odbccloseall".
2005 Apr 19
2
RODBC odbcCloseAll odbcClose Windows XP
Hello...
After installing the precompiled version of R 2.1.0 (congratulations
to the R Development Core Team) for Windows XP (Service Pack 2), I'm
having problems with the "odbcCloseAll" and "odbcClose" functions
within the "RODBC" package. I get pretty much the same error message
for both functions:
odbcCloseAll() produces:
Error in .Call("RODBCCloseAll", PACKAGE = "RODBC") :
"C" function name not in DLL for packag...
2009 Jan 26
2
R crashes when using the RODBC Package
..., but if I put a loop around
the code so that I fetch data from a different source table, and then save
it again to a different destination table, the code crashes. It is either
the final sqlQuery or sqlSave queries. I have no idea why it is crashing.
As an aside, I also have trouble with the odbcCloseAll() command - R tends
to crash with that, also.
I'm running this on Windows XP, Access 2003, R version 2.7.2
Any insights would be greatly appreciated! The condensed version of the
code is below.
# import the libraries
library(RODBC)
# Close any existing connections
odbcClos...
2006 Oct 27
2
Problem with RODBC
Hello,
I'am currently experiencing some problems with the odbcCloseAll() and odbcClose() function. I'm trying to connect an R script to a MySQL 5.0 database using RODBC1.1-7 and the MySQL ODBC Driver v.3.51 on a Windows XP Machine. At first everything seems fine. The script connects, reads and writes data but when it comes to odbcCloseAll() it crashes and hangs fo...
2004 Oct 25
1
.Rprofile and RODBC
...y but R 2.0 does not. How do I get R 2.0
to do this?
2) The following function no longer works in R 2.0 but
continues to work in R 1.9:
getExcel <- function (x) {
invisible(require(RODBC))
x <- sqlFetch(odbcConnectExcel(file.choose()),
"exceldata", na.strings = "NA")
odbcCloseAll() #closes the connection
invisible(edit(x))
}
I use this function to choose an Excel file and open
it using an ODBC connection. Why does this not work
now?
Thanks in advance for you help.
~Nick
2010 Feb 24
1
problem with looping on sqlSave()
...<- odbcConnectExcel("file.xls", readOnly=F)
> for (i in 1:4){
sqlSave(xlsFile, as.data.frame(test[[i]]), tablename="test", rownames=F,
addPK=T, append=T)
}
Error in odbcUpdate(channel, query, mydata, coldata[m, ], test = test,
: missing columns in 'data'
> odbcCloseAll()
I've tried different combination and the 1st element is always exported
but the next ones never. Elements 2 and 3 have the same number of
columns; the problem persists in that case.
Thanks a lot for your help
Ivan
2019 Jan 30
2
Conexion a SQLServer
Hola,
Yo empleo RODBC, previamente he creado el origen de datos ODBC en mi
equipo y hago:
library(RODBC)
odbc_con <- odbcConnect("origenODBC")
siniestros <- sqlQuery(odbc_con,"
SELECT *
FROM tal.tal")
odbcCloseAll()
Con VPN en remoto y demás, sin problemas. Saludos.
-------- Mensaje Original --------
Asunto: Re: [R-es] Conexion a SQLServer
Fecha: 29/01/2019 19:17
De: Javier Marcuzzi <javier.ruben.marcuzzi en gmail.com>
Destinatario: Jesús Para Fernández <j.para.fernandez en hotmail.com>
Cc: Li...
2006 Mar 05
1
Sweave and long strings
...nomchaineradio,
t2.filcodepere,
t2.filcodefils,
t2.filproba,
t2.filtransition from table1 t1,
table2 t2
WHERE t1.isoisotope = t2.filcodepere"
dfQuery <- sqlQuery(channel, cmd )
odbcCloseAll()
@
etc...
in the pdf document the command
cmd <- "SELECT t1.isoisotope, t1.periode,t1.nbZ,
t2.filnomchaineradio, t2.filcodepere, t2.filcodefils,
is written truncated only on one line not as it is written in the chunk
above.
I read in the R-archives we have to use the options comm...
2010 Jul 22
1
64 bit use of odbcConnectExcel
...s import problems?
My function
get.xls.file <- function(xlsfile){
library(RODBC)
#xlsfile <- file.choose()
channel1 <- odbcConnectExcel(xlsfile)
a <- sqlTables(channel1)
b <- nchar(a$TABLE_NAME[1])
x <- substring(a$TABLE_NAME[1], 2, b-2)
data <- sqlFetch(channel1, x, max=1001)
odbcCloseAll()
return(data)
}
JT
--
View this message in context: http://r.789695.n4.nabble.com/64-bit-use-of-odbcConnectExcel-tp2298927p2298927.html
Sent from the R help mailing list archive at Nabble.com.
2010 Aug 31
2
Error: cannot allocate vector of size 198.4 Mb
...ried with:
> memory.limit(size=2047);
[1] 2047
> memory.size(max=TRUE);
[1] 12.75
> library('RODBC');
> Channel<-odbcConnectAccess('c:/test.MDB'); # inputdata:15 cols, 2000000
rows, 173 MB
> x<-sqlFetch(Channel,'data1');
> odbcCloseAll();
> gc(TRUE)
Garbage collection 69 = 2+2+65 (level 2) ...
3.6 Mbytes of cons cells used (38%)
183.8 Mbytes of vectors used (36%)
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 134456 3.6 350000 9.4 350000 9.4
Vcells 24082306 183.8 67102875 512...
2010 Feb 23
1
RODBC to import/export xls files
...uld be
great if I could just import the 1st sheet into the dataframe.
- to export I do this (from Tal Galili's solution earlier today):
xlsFile <- odbcConnectExcel("file", readOnly=F)
save2excel <- function(x, t.name) sqlSave(xlsFile, x, tablename=t.name,
rownames=F, addPK=T)
odbcCloseAll()
It also works great, but how can I append lines? This function allows me
to append new sheets in the file, but I would also like to append new
lines of data onto one of the sheets. How can I do that?
- The last problem:
I would like to export a dataframe, but I get this error message:
> sa...
2005 Jun 22
10
How to read an excel data into R?
Hi all,
Does anybody know the easiest way to import excel data into R? I copied
and pasted the excel data into a txt file, and tried read.table, but R
reported that
Error in read.table("data_support.txt", sep = " ", header = T) :
more columns than column names
Thanks!
Ling
2010 Jan 18
1
Exporting a data.frame to excel using sqlSave - adds a character ' to values
...c) values.
Here is an example code:
library(RODBC)
library(MASS)
data(anorexia)
save2excel <- function(x, t.name) sqlSave(xlsFile, x, tablename = t.name,
rownames = FALSE)
xlsFile <- odbcConnectExcel("C:\\output-table.xls", readOnly = FALSE)
save2excel(anorexia, "temp")
odbcCloseAll()
So the output file has
*'*Treat
instead of:
Treat
In cell - A1
Thanks,
Tal
----------------Contact
Details:-------------------------------------------------------
Contact me: Tal.Galili@gmail.com | 972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew...
2009 Sep 08
0
RODBC version 1.3-0 crashes with systemtables using SQL server 2000
...R=NN;APP=Test;DATABASE=Northwind;Trusted_Connection=YES"
sql.ch <- odbcDriverConnect(connection = str, case = "nochange", believeNRows = TRUE)
sql <- "Select top 10 * From sysindexes"
cat(date(),"Start query\n")
rc <- sqlQuery(sql.ch, sql)
print(rc)
odbcCloseAll()
sink()
This is the output of the correct working version 1.2-5:
R version 2.8.1 (2008-12-22)
i386-pc-mingw32
locale:
LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252
attached base packages:
[1] stats...
2010 Dec 31
0
(no subject)
..., channel)
save2excel(mixing.parameters[[1]], "orientation_mix", channel)
save2excel(mixing.parameters[[2]], "risk_mix", channel)
save2excel(mixing.parameters[[3]], "partnership_rates", channel)
save2excel(mixing.parameters[[4]], "age_mixing_window", channel)
odbcCloseAll()
The above works fine as long as the file Calibrated_Parameters_Full_Set.xls does not exist. If it does exist then I get errors.
What command do I need to use to delete the whole Calibrated_Parameters_Full_Set.xls file or delete specific sheets - so that I can rewrite them?
Thanks.
Raff....
2011 Jul 20
1
Problem with RODBC
...05 [Microsoft][ODBC Excel Driver] The Microsoft Jet
database engine could not find the object 'Data$_'. Make sure the
object exists and that you spell its name and the path name correctly."
[2] "[RODBC] ERROR: Could not SQLExecDirect 'SELECT * FROM [Data$_]'"
> odbcCloseAll()
I was able to read the data in using xlsReadWrite by skipping the header
row and specifying the sheet name, so I have a workaround. I would like
to hear any advice on what might be wrong though since usually RODBC has
been extremely reliable. Data is confidential (and in a 14Mb file) so I
ca...
2006 Mar 06
3
Disconnect all MySQL connections
Hi
I've got the error "cannot allocate a new connection -- maximum of 16 connections
already opened" after I tried to create a new connection to a database. However,
the reason ist, that i did not disconnect previous connections....
I don't know the name of this connections. How can I disconnect this "unknown"
connections and drivers? if I delete all objects, the
2019 Jan 29
3
Conexion a SQLServer
Buenas,
Alguno usa alguno de los paquetes de Microsoft R para la conexion a SQL Server? De ser asi, que paquete y que comandos usais?
Yo hasta ahora he usado odbc, de Rstudio, pero me da siempre problemas con el tipo de datos que tiene SQLServer ...
Un saludo
Jes?s
[[alternative HTML version deleted]]
2009 Jul 15
1
Help with RODBC connection to multiple MS SQL Sever databases
...CT.CONTRACT, dbo_PATIENT.PATIENT_EPISODE, dbo_PATIENT.LAST_NAME
, dbo_PATIENT.FIRST_NAME, dbo_CONTRACT.CON_STATUS, dbo_CONTRACT.CON_NUMBER, dbo_PATIENT.STATE
, dbo_REGION_TERR.OPS_REGION, dbo_REGION_TERR.SPG_TERR
')
odbcCloseAll()
region
[1] "[RODBC] ERROR: Could not SQLExecDirect"
[2] "42000 102 [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'Completed'."
>
Chris Anderson
http://www.seocodebreaker.com/?thanky...
2005 Apr 24
1
large dataset import, aggregation and reshape
Dear useRs
We have a data-set (comma delimited) with 12Millions of rows, and 5
columns (in fact many more, but we need only 4 of them): id, factor 'a'
(5 levels), factor 'b' (15 levels), date-stamp, numeric measurement. We
run R on suse-linux 9.1 with 2GB RAM, (and a 3.5GB swap file).
on average we have 30 obs. per id. We want to aggregate (eg. sum of the
measuresments under
2009 Nov 16
5
Writing a data frame in an excel file
Hello, I am having trouble by using the write.table function to write a data
frame of 4 columns and 7530 rows. I don?t know if I should just use a
sep="\n" and change the .xls file into a .csv file. Thanks in advance
-----
Anna Lippel
new in R so be careful I should be asking a loooooooot of questions!:teeth:
--
View this message in context: