Displaying 20 results from an estimated 7000 matches similar to: "Avoiding multiple outputs using RODBC package"
2009 Jan 26
2
R crashes when using the RODBC Package
Hi,
I've written some code that fetches data from an Access Database (2003),
processes the data, then saves the modified data back into a table in the
Access database.
It works if I only pass through the code once, 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
2010 Feb 11
2
SAS and RODBC
I am using R-2.10.1 binary from CRAN on a WinXP Pro system. I also use SAS v9.2 on the same box. I just started using the SAS ODBC driver that comes with version 9 of SAS. I have been able to set up an ODBC source for SAS datasets using the driver, and then with RODBC I am able to read a sample SAS dataset.
> library(RODBC)
> ch <- odbcConnect('sasodbc', believeNRows=FALSE)
2005 Mar 15
1
RODBC, sqlSave and sqlAppend
Hi all,
I am currently trying to read, write and append data between R and MS access
using the RODBC library functions. I have no problems reading in the data
but when using sqlSave and sqlAppend it doesn't seem to work. I have made
sure that all the column names are sensible and there are no gaps etc in the
variables. My call looks like this:
sqlSave(channel,treatlist,test=F)
I've
2005 Aug 17
1
RODBC and sqlColumns
I have a Postgres database that I am connecting to with the Postgres
ODBC driver on Windows XP in R 2.1.0. In the database is a database
with two schemas (public and X). With RODBC (1.1-4) , I can connect to
the database and get the tables with sqlTables(db). I can query tables
in the schema with sqlQuery("SELECT * FROM X.test"). However, I can't
get the columns in table X.test
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
2001 Aug 31
1
RODBC SQLSave
I am having the following problem with RODBC
I connect to an oracle 8i (8.1.7) database using RODBC as follows;
dbConn <-
odbcConnect("mydatabase","myuserid","mypassword",case="oracle")
Then I extract some data, actually a whole table;
orgdata <- sqlQuery(dbConn, "select * from organism", na.strings = "NA")
Then I try to save it
2002 Jul 18
2
RODBC and Excel Files
Hello,
I am trying to play with RODBC library and Excel Files. In my file
(doubs.xls) there are 2 spreadsheets:
> library(RODBC)
> connection<-odbcConnect("Excel Files")
> sqlTables(connection)
TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS
1 F:\\Th?se\\R\\Doubs NA Faune$ SYSTEM TABLE NA
2 F:\\Th?se\\R\\Doubs NA Milieu$
2007 Mar 23
6
Updating a worksheet in Excel file using RODBC
Hello!
I have no problem reading Excel files (each worksheet in the file is a "table" which can be read - at least in my case).
What I would like to do is to read such a table, change it (just the contents, not the format) and write it back, and this I can not do. I am getting the following error messages (3 slightly different attempts):
> sqlSave(con, x, tablename =
2008 Nov 25
1
Error in sqlCopy in RODBC
Hi All,
I am trying to copy portions of tables from one SQL database to another,
using sqlCopy in the RODBC package.
RemoteChannel = connection to remote database
LocalChannel = connection to local database
LocalTable = table in my local database to receive data from the remote
database
query <- select query in SQL
sqlCopy(RemoteChannel, query, "LocalTable",
2009 Aug 06
1
creating MS Access query objects using RODBC
Hi -
I'm trying to use R to create an MS Access query object. In particular, I
would like to pass a given sql statement to a variety of Access files and
have that sql statement saved as an Access Query in each db. Is this
possible using R?
I'm aware that I could use RODBC sqlQuery and write sql to make a table or
that I could run the sql, extract it to R, and then use sqlSave to save the
2002 Mar 20
1
RODBC under Windows
Hi,
I have been just playing with the ODBC connectivity under Windows. I have
never done this before and I thought I would go through some examples in
the "Data Import/Export" manual and learn how to setup data connections
while doing that. I ran into a small problem and I am not sure if this is
something I am doing wrong or a bug or, perhaps, a feature of the RODBC
package.
Here is
2006 Jul 25
1
[RODBC] ERROR: Could not SQLExecDirect
Hi,
I've got a problem with RODBC and saving (sqlSave) of a dataframe in Access.
R 2.0.1 is running on windows XP.
When executing the examples in R help for the "USArrests" data set "sqlSAve" works fine, but running sqlSave() for a dataframe "Adat"
> str(Adat)
`data.frame': 1202 obs. of 18 variables:
containing 18 columns and ca. 1200 rows fails.
2007 Feb 20
2
RODBC problems with unixodbc
Hi,
I noticed that if a column is named "end" in a data frame (table.df
below), it leads to errors when trying to sqlSave()'it to a postgresql
connection:
---<---------------cut here---------------start-------------->---
con <- odbcConnect("PostgreSQL-DB", uid="user", pwd="password",
case="postgresql")
R>
2006 Jun 09
3
sqlSave() and rownames=TRUE makes my Rgui crash
Hello,
I created a table in MySQL with this command
CREATE TABLE example (pk INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(pk),
id VARCHAR(30),col1 VARCHAR(30),col2 VARCHAR(30))
### In R, I can connect to this table:
library(DBI)
library(RODBC)
chan <- odbcConnect("MySQL51", uid="root", pwd="xxx")
first <- sqlQuery(chan, "select * from example")
2006 Oct 13
1
RODBC sqlQuery insert slow
Large for loops are slow. Try to avoid them using apply, sapply, etc.
I've made the paste statements a lot shorter by using collapse. See
?paste for more info.
Append.SQL <- function(x, channel){
sql="INSERT INTO logger (time, v1, v2, v3, v4, v5, v6, v7, v8, v9,
v10) VALUES("d1=strptime(x[2],"%d/%m/%y %H:%M:%S %p '", d1, "' ,",
paste(x[3:12],
2003 Jul 21
1
RODBC: problem saving a new table in an "Excel database"
Hi
I am using package RODBC version 1.0-1 under R version 1.7.1 on Windows
XP Pro. I am having problems writing a new table to an (Excel) database
using sqlSave.
I connect to an empty Excel spreadsheet using odbcConnectExcel (which, I
believe, uses the Microsoft Excel Driver DSN). Then I try and save a new
table to the database(spreadsheet) using SqlSave, but obtain an error
message.
Below is
2003 Apr 02
1
RODBC sqlSave problem.
Dear list,
Being new to both the postgres database, ODBC and the RODBC interface, I
am somewhat confused by some of the problems I am experiencing trying to
connect R to the database.
Whai I am trying is basically the example part of the help file for the
sqlSave function:
> library(RODBC)
> odbcConnect("theodor") -> channel
> data(USArrests)
> sqlSave(channel,
2009 Oct 16
2
RODBC sqlSave does not append the records to a DB2 table
I am running R version 2.9.2 on Windows XP OS with RODBC version Version:
1.3-0.
Has anyone out there in the R user community successfully appended records
to a DB2 table on a remote database using the sqlSave function in the RODBC
package? (or by any other means from R?)
I posed a similar question a few months ago and unfortunately, did not
receive a response. I was hoping recent upgrades to
2003 Jan 29
1
RODBC sqlSave Error
Hi,
i get error after using a data.frame with subset for "sqlSave".
What can i do ?
It seems that lines like this in a data.frame structure are after subset
deleted and cause
the error ?
- attr(*, "variable.labels")= Named chr "CUSID" "Welle"
"Arbeitgeberfavorit1" "Aktuelle Bewerbungssituation" ...
..- attr(*, "names")=
2010 May 16
1
RODBC-Error-sqlSave
Dear R-community,
After repeating the sqlSave-command 3 times on a dataframe (of size 13149
rows * 5 columns) to my MS-Access database I get the following error:
*Error in sqlSave(channel, eksport_transp_acc_2, "transp_acc_scenarier", :
unable to append to table ‘transp_acc_scenarier’*
**
This means that the first 2 savings are completed, but the third-one
is somehow not. I have an