search for: odbccloseal

Displaying 20 results from an estimated 96 matches for "odbccloseal".

Did you mean: 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 packa...
2009 Nov 18
3
Re ading multiple Excel 2007 files with a loop
I have several hundred Excel 2007 data files in a folder. I would like to read every file in a single given folder using a loop. I have searched the FAQ, the forum archives here, other or older R boards and the R Import / Export documentation, and have asked some very knowledgeable R users without learning of a solution. I hope someone here can help. I understand that the most common
2007 Jan 16
0
Rgui crashes when calling odbcClose()
Hi, I'm running Rgui v2.4.0, RODBC v1.1-8, and psqlODBC v8.2.0002. Whenever I do the following chan <- odbcConnect("mydatabase", uid="admin") # connection to a postgresql db on a linux box tmp <- sqlQuery(chan, "select * from sometable;") # this is successfull odbcClose(chan) # this crashes Rgui and raises an error window containing the following MS error
2006 Sep 19
1
RODBC Connections closed automatically in background
I am having a problem with RODBC's connections. It appears that my connection to the database is closed by R automatically before I am done with it. Here is my code: foo <- function(dsn) { db <- odbcConnect(dsn) odbcSetAutoCommit(db, FALSE) data <- someDatabaseOperation(db) data2 <- someLongCalculation(data) anotherDatabaseOperation(db, data2) # This often fails b/c the
2007 Mar 06
2
Package RODBC
I have some questions about the RODBC package. library(RODBC) # required for those who want to repeat these lines 1st, I noticed that the following sequence does not work: channel <- odbcConnextExcel("test.xls") tables <- sqlTables(channel) name1 <- tables[1, "TABLE_NAME"] # this should be the name plan1 <- sqlFetch(channel, name1) # bang!
2011 Feb 10
2
Rioja package, creating transfer function, WA, "Error in FUN"
Hi, I am a new R user and am trying to construct a palaeoenvironmental transfer function (weighted averaging method) using the package rioja. I've managed to insert the two matrices (the species abundance and the environmental data) and have assigned them to the y and x values respectively. When I try and enter the 'WA' function though, I get an 'Error in FUN' message (see
2001 May 14
1
RODBC: closing databases
Dear all, platform i386-pc-mingw32 arch x86 os Win32 system x86, Win32 status major 1 minor 2.3 year 2001 month 04 day 26 language R I wrote the following to import tables in different database formats (Access, Visual FoxPro, etc.): getTable <-
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
2012 May 29
1
RODBC, Excel, and data truncation when writing
Hi, I am hoping to use the RODBC package to write a dataframe to an Excel .xlsx file. The dataframe contains at least one field with character elements that exceed 255 bytes, which appears to be the cell width limit in Excel. Below is example code and the warning message received: library(RODBC) d <-
2003 Aug 06
1
RODBC with Windows XP
Hi R-Users, I have very recently switched from using R on windows 2000 to windows XP Professional. With XP I am having problems using the "odbcConnect("")" command. I can use the command perfectly well until I close the database channel with the command "odbcClose(channel)". When I try and re-establish connection following the close command no dialog box appears
2006 Oct 05
2
Variables in RODBC environment
Hello Experts, how can I use variables in the RODBC environment. Example which does not work: Thanks for your help. Thorsten pn <- '39R5238'; library(RODBC); odbcobj <- odbcConnect("SQUIT21C",uid="muehge",pwd="xxx"); sql <- "select u.unitid, from test where part in ('pn') "; parameter <- sqlQuery(odbcobj,sql);
2007 Apr 19
2
element search
Dear R-experts, I have got an excel file as attached. I imported it successful with the commands: library(RODBC) channel <- odbcConnectExcel("data2.xls") tables <- sqlTables(channel) # list the names of the spreadsheets name1 <- tables[1, "TABLE_NAME"] # get the name of the 1st spreadsheet plan1 <- sqlQuery(channel, sprintf("select * from [%s]",
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 odbcClo...
2012 Aug 01
2
Why the result is coming as NULL?
Why the result is coming as NULL. Can anyone help. I want to find the outliers for a reference setwd("D:/AZ") library("RODBC") cdb_cnct <- odbcConnectExcel("Book1.xls") cdb_frame <- sqlFetch(cdb_cnct, "Sheet1") odbcClose(cdb_cnct) rm(cdb_cnct) x<- cdb_frame$Publication >=1990 & cdb_frame$Publication <=2012 invalid <- cdb_frame[!x,
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
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
2012 Aug 14
2
Not able to filter factor, class
After importing data from Excel through ODBC. In the inclusion dataset, class(inclusion$Value) is coming as factor. After filtering the data, length(inclusion$Value == 0),the answer is coming as 4879, but actually Value contains only 225 rows. So how can I get the length as 225. Can anyone help? setwd("D:/AZ") library("RODBC") cdb_cnct <-
2011 Aug 12
2
Getting data from an *.RData file into a data.frame object.
Hi, all. I'm new to R. I've been a SAS programmer for 20 years. I seem to be having trouble with the most basic task - bringing a table in an *.RData file into a data.frame object. Here's how I created the *.RData file. library(RODBC) db <- odbcConnect("*******") df <- sqlQuery( db , "select * from schema.table where year(someDate)=2006" ) save(
2005 Nov 02
2
RODBC and Excel: Wrong Data Type Assumed on Import
The first column in my Excel sheet has mostly numbers but I need to treat it as character data: > library(RODBC) > channel <- odbcConnectExcel("U:/efg/lab/R/Plasmid/construct list.xls") > plasmid <- sqlFetch(channel,"Sheet1", as.is=TRUE) > odbcClose(channel) > names(plasmid) [1] "Plasmid Number" "Plasmid"
2008 Jul 10
0
RODBC Close Memory Leak Question
Hi everyone, In relation to the RODBC odbcClose bug which was fixed back in the changelog below: Version: 1.2-3 (2008-01-24, released) * Plug a memory leak in inRODBCClose (closing a connection), reported by Stephan Henne. * Use translateChar() on character data sent in. Background: I am running some data from a SQL Server database, through unixODBC (freetds) into R via the RODBC