Displaying 20 results from an estimated 1000 matches similar to: "Problem with ODBC access to SQL database"
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 = "")
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 <-
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
2003 Apr 04
2
sqlSave() Question
All,
I am new in R. I found sqlSave() doesn't work for our Oracle9i. The
following was the message:
> sqlSave(channel, USArrests, rownames="state")
Error in sqlColumns(channel, tablename) : USArrests : table not found on
channel
Check case parameter in odbcConnect
>
sqlQuery() works OK.
Please help. Thanks.
-MY
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,
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
2008 May 07
0
RODBC sqlSave with multiple schema in DB2
Hi,
I am trying to use sqlSave to write a dataframe to an existing table in a
DB2 database. The database contains two schemas. My experience is the
following: (1) in the case that tablename is left empty in sqlSave, R
writes to the instance level schema (2) in the case that a tablename is
specified and that table name exists only once in the database, R will
write to that table irrespective
2012 Dec 13
0
max_prepared_stmt_count exceeded using RODBC + 64-bit win7
Hi
I am running R2.15.2 64-bit on Windows 7, using RODBC 1.3-6, MySQL5.5.20,
MySQL Connector 5.5.2 - these are the latest 64-bit versions AFAIK.
sqlQuery and sqlSave work fin as expected, but in a long session with a few
sqlSave() calls, I get an error, for example:
Error in sqlSave(channel = channel, dat = USArrests[, 1, drop = FALSE], :
HY000 1461 [MySQL][ODBC 5.2(w)
2007 Mar 07
0
sqlSave help!
Hi Everyone,
I'm so confused. I've been trying to save data to a table but I keep
getting an error that says the table
does not exist and at other times saying that it does. So here are some
statements:
> sqlQuery(channel, "select top 1 * from
> TestDB.[SILICON\\holouis1].clep_tier_shift")
State NB Change_Number
1 IL 2005-02-08 7
It exists and I
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$
2000 Mar 08
0
RODBC: follow up
Hi Michael,
Here is the result of my first testing:
(0) Dr. Watson
Sorry, I should have given a more precise description: by default in R
exists a function with the name 'table', if you use this name as in
odbcPrimaryKeys(0, table)
a Dr. Watson occurs, because table does not give a table name.
However, it is always a good idea to prevent Dr. Watsons, even if it is
triggered by a
2006 Jan 02
2
RODBC help
Dear Prof. Ripley et al.,
I have a data frame with some variable names that contain the underscore
character ('_'). It seems that RODBC is not converting them to a suitable
variable name for MySQL.
> sqlSave(channel, zz, addPK = TRUE, verbose = TRUE)
Query: CREATE TABLE zz (rownames varchar(255) PRIMARY KEY, NAME
varchar(255), ID varchar(255), GROUP varchar(255), OAC_RT double,
2010 Feb 24
1
problem with sqlSave()
Dear R users,
I've already asked this question yesterday, but, though I had answer for
the other ones (and they helped a lot, thanks), for some reason didn't
get an answer for this one (I would also appreciate to know why, so that
I can improve the quality and clarity of my future questions).
Here it is again:
I'm trying to use RODBC to export dataframes to xls files.
When I run
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 <-
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
2010 Feb 24
1
problem with looping on sqlSave()
Dear R users,
I have a follow-up question on sqlSave().
Since most of the output from the tests I use are lists, I would like to
loop to export each element of the list and append it to the sheet.
Here is what I do:
> library(RODBC)
> test <- structure(list(m = structure(c(0.090909090909091,
0.181818181818182,
0.272727272727273, 0.363636363636364, 0.454545454545455,
2017 Jul 13
2
consulta por varTypes de sqlSave en RODBC
Hola Javier, si no estoy entendiendo mal, lo q deseo hacer no se trata de
configurar los parametros SQL, sino solo de colocar un vector en el
argumento VarTypes de la funcion sqlSave.
El manual especifica esa opcion, pero no da ningun ejemplo de como usarla.
*varTypes an optional named character vector giving the DBMSs datatypes to
be used for*
*some (or all) of the columns if a table is to be
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.
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
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