similar to: RODBC: sqlUpdate doesn't handle properly POSIXct field?

Displaying 20 results from an estimated 1000 matches similar to: "RODBC: sqlUpdate doesn't handle properly POSIXct field?"

2010 Feb 03
2
sqlUpdate RODBC
Dear all, I using R version 2.9.0 on Windows XP and want to insert data from a data frame in R into a oracle database via sqlUpdate with the package RODBC. My example is the following: TEST0<-data.frame(NR=c(1,2,600),NAME=c("JK","TR","AR"), DATUM=c("2009-01-01","2010-01-02","2010-06-09")) If I create the table in the database with
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>
2010 Nov 25
1
RODBC
Hi, I am running 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 = "")
2011 May 02
2
INSERT OR UPDATE
I'm trying to insert rows of a data.frame into a database table, or update where the key fields of a record already exist in the table. I've come up with a possible solution below, but would like to hear if anyone has a better solution. # The problem demonstrated: # Create a data.frame with test values library(RODBC) tbl <- data.frame( key1 = rep(1:3, each = 2), key2 =
2008 Feb 25
2
Exporting a dataframe from R to Excel
I am trying to export a dateframe created in R: > Duration_summary V1 2.5 % 97.5 % V4 2.5 % 97.5 % [1,] 1 0.46076018 1.128776 1.000000 0.5280828 0.9576338 [2,] 0 0.00000000 0.000000 1.000000 0.1741793 1.2352705 [3,] 1 0.46566719 1.313711 1.000000 0.7233312 1.4097987 [4,] 1 0.38866371 2.453226 0.976024 0.6377314 1.3493957 [5,] 1 0.08894066 1.036830
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.
2011 May 04
1
tryCatch?
I would like to do inserts into a database table, but do updates in the fairly rare cases in which the inserts fail. I thought tryCatch might be the way to do it, but I honestly do not understand the help file for tryCatch at all. I thought something like this might work: for (i in seq(along = tbl$key)) { tryCatch(sqlSave(pg, tbl[i, ], "tbl", append = TRUE, rownames = FALSE),
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 =
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,
2007 Nov 07
1
Dealing with schema in RODBC
Is there a way to get a table in a certain schema? The Oracle database I am using has a table by the same name in two different schemas. This creates problems in sqlUpdate because to sqlUpdate there are duplicate columns. The following is part of the output of sqlColumns: sqlColumns(eids, "TEST_ARTCL_INST")[,1:4] TABLE_CAT TABLE_SCHEM TABLE_NAME COLUMN_NAME 1
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)
2011 Dec 13
0
rodbc -- save result to a table
Hi All, I am pretty new for RODBC. I want to save my table to a DB, so I used something like sqlSave(db, a, 'Forecast_Result', rownames = FALSE); But I got an error Error in sqlSave(db, a, "Forecast_Result", rownames = FALSE) : table 'Forecast_Result' already exists Yes, that table has been created before. But I need to overwrite the content in that
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 <-
2010 Feb 23
1
RODBC to import/export xls files
Dear R users, I've learned today about RODBC package in order to import xls file to dataframes and export the dataframes to xls files. However I have some problems. Please excuse me if these are basic but as I said, I've just begun with this package. Also this email is quite long, but everything is related, so I don't think it would be better to split it. Moreover, there's a
2009 Mar 01
1
Temporary tables with Microsoft SQL?
I can create a temp table with MySQL and R DBI[1], but I don't see how to do the same with Microsoft SQL 2005 and RODBC. R 2.8.1 creates the table, but then it can never see it. I'm looking to avoid replacing the convenience functions like sqlSave(). [1] https://stat.ethz.ch/pipermail/r-help/2009-March/190033.html > library(RODBC) > channel <-
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
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
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
2011 Nov 10
1
Help: sqlSave Error
I am using sqlSave to save my data into an existing table at MS SQL Server database. Previously my code ran smoothly but all of a sudden it stopped working. Here is my code: sqlSave(con, highVol, "dbo.futuresHighVol", append=TRUE, rownames=FALSE) Error: sqlSave(con, highVol, "jrgchis.dbo.futuresHighVol", append = TRUE, : 42S01 2714 [Microsoft][ODBC SQL Server Driver][SQL