Displaying 20 results from an estimated 1300 matches similar to: "RODBC package: how to check whether connection is open"
2009 May 29
1
RODBC sqlSave with DB2
I am running R version 2.8.1 on Windows XP OS.
This works fine. (Data.frame dta is created with records from the DB2
table.):
sql <- "select * from storage.testappend_slt order by uut"
dta <- sqlQuery(channel,sql)
But when I try to append records (from data.frame newdta) to the same DB2
table. I get an error:
sqlSave(channel, newdta, tablename = storage.testappend_slt, append
2007 Jul 17
4
[R-sig-DB] RODBC on Oracle DB
essai <- odbcConnect("ORESTE_prod", uid="osis_r", pwd="12miss15" ,case="oracle")
> sqlTables(essai)$ORESTE
...
1315 <NA> ORESTE S_PROFESSIONS_OLD TABLE <NA>
1316 <NA> ORESTE S_PROVENANCES TABLE <NA>
1317 <NA> ORESTE
2008 May 05
2
RODBC and schemas
I have found that the "schema.table" syntax used in Postgresql (and
Oracle) does not work directly with RODBC.
This works
library(RODBC)
con<-odbcConnect("mydb")
d<-sqlQuery(con,"select * from meso.trees")
However this does not.
d<-sqlFetch(con,"meso.trees")
Error in odbcTableExists(channel, sqtable) :
?meso.trees?: table not found on channel
2002 Dec 31
1
RODBCType&NullDataExportProblems
Hello
I am trying to move data between R and other systems (e.g. SAS and MS
SQL Server) using RODBC. I think I have the most recent version of
RODBC (0.9) and here is some other system info:
> odbcGetInfo(channel)
[1] "Microsoft SQL Server version 08.00.0679. Driver ODBC version 03.52"
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386,
2010 Feb 16
1
RODBC missing values in integer columns
Hello,
We are having some strange issues with RODBC related to integer columns.
Whenever we do a sql query the data in a integer column is 150 actual data
points then 150 0's then 150 actual data points then 150 0's. However, our
database actually has numbers where the 0's are filled in. Furthermore,
other datatypes do not have this problem: double and varchar are correct and
do not
2013 Sep 26
0
RODBC Package help ----binding issue
Hi All,
There's a function called setSqlTypeInfo(driver,value) in RODBC package http://cran.r-project.org/web/packages/RODBC/index.html
Description
Specify or retrieve a mapping of R types to DBMS datatypes.
>From the package(RODBC) TypeInfo.r:
setSqlTypeInfo <- function(driver, value)
{
if(!is.character(driver) || length(driver) != 1L)
stop("argument
2008 Sep 24
0
Error results from MS Access via RODBC
I have an MS Access database with one table and one column holding rep(1:10)
I use:
library(RODBC)
channel <- odbcConnect("test")
sqlQuery(channel, paste("SELECT col FROM tblTest"), believeNRows=FALSE)
and get:
49
50
51
52
53
54
55
56
57
12337
What? The above should, of course, read:
1
2
3
4
5
6
7
8
9
10
I tried the 'odbcQuery' /
2006 Dec 28
0
RODBC not working when connecting to a Sybase database
What is this error message about and how do I troubleshoot it?
> sqlTables(channel)
Error in .Call("RODBCFetchRows", attr(channel, "handle_ptr"), max, buffsize, :
negative length vectors are not allowed
The channel was created as such
channel <- odbcConnect("Labdata")
I think this is telling me that my odbcConnect command worked
>
2004 Apr 30
0
RODBC & MS SQL Server: repeated calls to sqlGetResults() problem
Dear list,
RODBC is mostly working very well on Windows XP talking to MS SQL Server.
However, when trying to retrieve a result set in repeated batches the first
batch returns results ok, but then subsequent calls return no data (see code
below). I tried setting believeNRows=FALSE both in odbcConnect() and in
sqlGetResults() but this doesn't appear to make any difference. Also
odbcFetchRows()
2010 May 04
1
strange behavior of RODBC and/or ssconvert
Dear All,
I have the following problem when reading files (a lot of them) in the
spreadsheetML format into R. The spreadsheetML format is an xml format
to allow easy import of multisheet data in Excel. As far as I can see,
a direct import into R (using the XML package) is not feasible. I use
the software ssconvert (included in Gnumeric) and call it from R. It
converts the spreadsheetML into xls
2011 Feb 26
0
Problem with RODBC sqlSave
Hi,
I'm able to establish a successful odbc connection using RODBC 1.3-2 on Win
7 and R 2.12.0. But I'm getting the following error message when I try to
save a data frame into the debase as shown below.
library(RODBC)
bbdb <- odbcConnect("bbdb")
odbcGetInfo(bbdb) # returns ok
sqlSave(bbdb, USArrests, rownames = "state", addPK=TRUE) # example from the
RODBC manual
2004 Sep 15
0
RODBC 1.1-1
The first non-maintenance update of RODBC since January 2003 is now on
CRAN and will soon propagate to mirrors. From the ChangeLog:
* Select the decimal point from Sys.localeconv.
* Add an external reference and finalizer so open channels get
closed at the end of the session or when there is no R object
referring to them.
* There is no longer a
2004 Sep 15
0
RODBC 1.1-1
The first non-maintenance update of RODBC since January 2003 is now on
CRAN and will soon propagate to mirrors. From the ChangeLog:
* Select the decimal point from Sys.localeconv.
* Add an external reference and finalizer so open channels get
closed at the end of the session or when there is no R object
referring to them.
* There is no longer a
2012 Nov 26
2
puzzling RODBC error
Dear all,
I'm trying to connect to an MSAccess database (ArcGIS personal geodatabase). 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 <-
2003 Dec 22
4
Audio format for announcements
Hi guys. First off, to the folks at Digium: outstanding work. The fact
that Asterisk is open source puts you right at the cusp of what will be
the most important telecom advance since the transatlantic cable.
Anyway... a couple newbie questions concerning sound quality - I don't
see any reason why the system should not use the best possible format
for any given connection.
1) Is it
2007 Aug 14
4
Import of Access data via RODBC changes column name ("NO" to "Expr1014") and the content of the column
Dear all,
I have some problems with importing data from an Access data base via
RODBC to R. The data base contains several tables, which all are
imported consecutively. One table has a column with column name "NO". If
I run the code attached on the bottom of the mail I get no complain, but
the column name (name of the respective vector of the data.frame) is
"Expr1014" instead
2007 Oct 17
3
R and TeraData
Hello,
Does anyone know a way to connect from R on Linux box to TeraData
server? I can use ODBC connection on Windows box, but with amount of
data I need (and prefer) to use large Linux box.
Thanks,
Vadim
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
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")
:
2012 Feb 06
0
sqsSave() test using Test.R script returning error suggesting no values upon "insert"
Hi.
I attempted to use RODBC and decided to execute all the tests provided in "Test.r" under the unpacked package RODBC folder.
Beginning with the following:
library(RODBC)
library(MASS)
USArrests[1,2] <- NA
hills <- hills[1:15,]
row.names(hills)[12] <- "Dollar ('$')"
set.seed(1)
# MySQL
## testdb3 is ODBC/Connector 3.51.x, testdb5 is 5.1.x
channel <-