search for: odbcquery

Displaying 20 results from an estimated 29 matches for "odbcquery".

2008 Jul 23
2
Using RODBC to use SQL queries
...am new to the RODBC package, but I have looked over the PDF as well as a few websites that go over the SQL language. I can connect to my database fine using >channel<-odbcConnect("Oracle ODBC") # then am prompted to enter my user id and password After that I'd like to use the odbcQuery function and the SQL statement: SELECT * FROM table_name WHERE SAMPLE_YEA LIKE "1965%" According to the RODBC PDF, the odbcQuery command should accept any valid SQL statement. Is there something wrong with my syntax? I have tried a few things, like attaching the tables to the data frame...
2008 Mar 18
1
odbcQuery , memory.size
...38 Tables from 38 ESRI Geodatabases through an ODBC connection. I stored the 38 channels in a list and the 38 tablenames in an other list. With a for(i in 1:38) .... sqlFetch(....) I try to read the tables into a third list. But always after a certain amount of rounds (mostly 16) i get Fehler in odbcQuery(channel, query, rows_at_time) : Calloc konnte nicht (67108864 von 1) Speicher zuteilen Zusätzlich: Warning message: Reached total allocation of 1021Mb: see help(memory.size) When I keep on trying the rounds will stop at 1. Any sugestions? Sincerely Lukas -- -- Arbeit: Tel: +41 44 632...
2007 Jan 26
0
FW: reducing RODBC odbcQuery memory use?
...list for a question like this below; please let me know if this is a general help question. Jill Willie Open Seas Safeco Insurance jilwil at safeco.com -----Original Message----- From: WILLIE, JILL Sent: Thursday, January 25, 2007 2:27 PM To: r-help at stat.math.ethz.ch Subject: reducing RODBC odbcQuery memory use? Basic Questions: 1. Can I avoid having RODBC use so much memory (35 times the data size or more) making a data.frame & then .rda file via. sqlQuery/save? 2. If not, is there some more appropriate way from w/in R to pull large data sets (2-5GB) into .rda files from sql? Test...
2008 Mar 03
0
reducing RODBC odbcQuery memory use?
1. Can I avoid having RODBC use so much memory (35 times the data size or more) making a data.frame & then .rda file via. sqlQuery/save? 2. If not, is there some more appropriate way from w/in R to pull large data sets (2-5GB) into .rda files from sql? [R] reducing RODBC odbcQuery memory use? From: WILLIE, JILL <JILWIL_at_SAFECO.com> Date: Thu 25 Jan 2007 - 22:27:02 GMT Basic Questions: Can I avoid having RODBC use so much memory (35 times the data size or more) making a data.frame & then .rda file via. sqlQuery/save? If not,...
2002 Sep 04
1
Passing dynamic sql statement to RODBC functions
Hi, Does anyone know how to pass dynamic sql statement to RODBC function "odbcQuery()" or "sqlQuery()"? eg.: under R session, I did: >library(RODBC) >channel<-odbcConnect(...) >data1<-2.5 >data2<-5.0 I want to construct the INSERT sql statement using variables "data1" and "data2" and pass this statement to odbcQuery() . Can...
2010 Jan 24
0
Setting the value of max in calls to sqlGetResults
...t; sqlQuery(channel,"select sysdate from dual") Error in .Call(C_RODBCFetchRows, attr(channel, "handle_ptr"), max, buffsize, : negative length vectors are not allowed > close(channel) > q() I know I can replace the call to sqlQuery with calls to its component functions odbcQuery and sqlGetResults to get the same result (and the same error) > library(RODBC) > channel <- odbcConnect("OraLSH", <user>, <password>) > odbcQuery (channel, "select sysdate from dual") > sqlGetResults(channel, as.is=FALSE, errors=FALSE, max=0, buffsize...
2010 Jan 24
0
Setting thevalue of max in calls to sqlGetResults
...t; sqlQuery(channel,"select sysdate from dual") Error in .Call(C_RODBCFetchRows, attr(channel, "handle_ptr"), max, buffsize, : negative length vectors are not allowed > close(channel) > q() I know I can replace the call to sqlQuery with calls to its component functions odbcQuery and sqlGetResults to get the same result (and the same error) > library(RODBC) > channel <- odbcConnect("OraLSH", <user>, <password>) > odbcQuery (channel, "select sysdate from dual") > sqlGetResults(channel, as.is=FALSE, errors=FALSE, max=0, buffsize...
2005 Mar 21
0
Cdr_odbc asterisk 1.0.6
Asterisk Ready. *CLI> -- Executing route("SIP/7408-02e3", "370263") in new stack -- odbcquery: query=370263 > Query = 370263 : SQLcmd = select routing, ring_timer from ddi_pool where ddi_inbound = '370263' Urgent handler > app_route: Query Successful! -- Varname= 55 -- odbcquery: set route 721017101 -- odbcquery: set timer 15 Urgent handler -- E...
2007 Aug 14
4
Import of Access data via RODBC changes column name ("NO" to "Expr1014") and the content of the column
...I have is that when I rerun "rm(list = ls(all = T)); gc()" and the import several times I get the following error: Error in odbcTables(channel) : Calloc could not allocate (263168 of 1) memory In addition: Warning messages: 1: Reached total allocation of 447Mb: see help(memory.size) in: odbcQuery(channel, query, rows_at_time) 2: Reached total allocation of 447Mb: see help(memory.size) in: odbcQuery(channel, query, rows_at_time) 3: Reached total allocation of 447Mb: see help(memory.size) in: odbcTables(channel) 4: Reached total allocation of 447Mb: see help(memory.size) in: odbcTables(cha...
2006 Feb 27
4
prepared query with RODBC ?
Dear List, Would anyone know how to perform prepared queries with ROBC ? I had a shot with some of the internal (non-exported) functions of the package but ended up with a segfault, so I prefer asking around before experimenting further... Thanks, Laurent
2002 Sep 05
0
AW: Passing dynamic sql statement to RODBC functions
...:Lingyun.Shi at fimat.com] > Gesendet: Mittwoch, 04. September 2002 23:41 > An: r-help at stat.math.ethz.ch > Betreff: [R] Passing dynamic sql statement to RODBC functions > > > > Hi, > > Does anyone know how to pass dynamic sql statement to RODBC function > "odbcQuery()" or "sqlQuery()"? > eg.: under R session, I did: > >library(RODBC) > >channel<-odbcConnect(...) > >data1<-2.5 > >data2<-5.0 > I want to construct the INSERT sql statement using variables > "data1" and > "data2" and...
2004 Apr 30
0
RODBC & MS SQL Server: repeated calls to sqlGetResults() problem
...code below). I tried setting believeNRows=FALSE both in odbcConnect() and in sqlGetResults() but this doesn't appear to make any difference. Also odbcFetchRows() suffers the same problem. The documentation states "sqlGetResults is a mid-level function. It should be called after a call to odbcQuery and used to retrieve waiting results into a data frame. Its main use is with max set to non zero it will retrieve the result set in batches with repeated calls." Have I mis-understood? Is this a driver problem? Something else? Any help/advice much appreciated. Many thanks in advance, Matth...
2005 May 23
0
App_odbcexec
Hello everyone, I have just gone through the installation process to add commands ODBCexec and ODBCquery to the extensions.conf. However I am receiving an error in asterisk "No application 'ODBCquery' for extension (incoming,33,2)". I have installed unixODBC-2.2.11 and myODBC 3.51. I have gone through the instructions as per http://www.loligo.com/asterisk/misc/apps/odbc/app_odbcex...
2011 Dec 20
1
RODBC Error: 'getCharCE' must be called on a CHARSXP
...uot;some_dsn", uid="", pwd="") txt<-'SELECT Date, Region, Price FROM TableXYZ WHERE Type="Domestic"' sqlQuery(channel, cat(txt,"\n"),errors=TRUE,) close(channel) However, I get the following error immediately after sqlQuery command: Error in odbcQuery(channel, query, rows_at_time) : 'getCharCE' must be called on a CHARSXP I believe my connection is good because I used the following commands to successfully view the columns: sqlColumns(channel, TableXYZ) There doesn't seem to be much info on "getCharCE" and/or "CHA...
2007 Jan 30
0
calloc bug in RODBC 1.1-7 and later?
...ODBC Version: 1.1-7 Date: 2006-05-24 > library("RODBC") > channel <- > odbcConnectAccess("S:/Bioinformatics/Software/Affy/Data/MOE430A/MOE430A.mdb") > moe430a <- sqlFetch(channel,"Annotation", as.is=TRUE) Error in odbcQuery(channel, query, rows_at_time) : Calloc could not allocate (67108864 of 1) memory In addition: Warning message: Reached total allocation of 1024Mb: see help(memory.size) R version 2.4.1 (2006-12-18) Package: RODBC Version: 1.1-8 Date: 20...
2014 Jun 30
1
Getting data from Table in RStudio
...had proceeded to add a dataset to RStudio using the following code: library(RODBC)  dsn.name <- "MySQLlocal"  user.name <- "orange" pwd <- "" ch <- odbcConnect(dsn=dsn.name,uid=user.name,pwd = pwd) res <- sqlFetch(ch, "<my_table_name>")  odbcQuery(ch, "Select * from <my_table_name>") odbcClose(ch) When the code is run all that is returned is  > library (RODBC) > dsn.name <- "MySQLlocal"  > user.name <- "orange"  > pwd <- ""  > ch <- odbcConnect(dsn=dsn.name,uid=user.na...
2002 Aug 02
1
R to Oracle via RODBC
...iver Driver Manager: unixODBC I get the following error when trying to executing RODBC commands. Can anybody give me pointers as to what I'm missing or doing wrong > library(RODBC) > channel <- ("DSNName") > sqlQuery(channel,"select * from tableX") Error in odbcQuery(channel, query) : NAs in foreign function call (arg 1) In addition: Warning message: NAs introduced by coercion > odbcTables(channel) Error in odbcTables(channel) : NAs in foreign function call (arg 1) In addition: Warning message: NAs introduced by coercion I am successfully able to run queri...
2007 Sep 29
1
RODBC and Oracle
...t it's some kind of row limit or buffer limit thing going on. I searched the archives and Brian Ripley suggested playing with believeNRows parameter (setting it to FALSE) as Oracle is not well behaved. I've tried various combinations of this and delving into the lower level functions like odbcQuery and sqlGetResults but I'm still getting the same thing: 0 rows back unless I cut the query down to a more return a more reasonable range. Obviously I can't reproduce the problem here because of the database, but does anyone have any suggestions/tips/pointers to get me going toward a solut...
2012 Aug 27
1
Querying sqlite through RODBC causes R to crash
...# 'test3' being an ODBC datasource configured with SQLite3 driver, # but the same happens with SQLite driver sqlQuery(con3, "select * from test") # 'test' being any table *** caught segfault *** address 0x438, cause 'memory not mapped' Traceback: 1: .Call(C_RODBCQuery, attr(channel, "handle_ptr"), as.character(query), as.integer(rows_at_time)) 2: odbcQuery(channel, query, rows_at_time) 3: sqlQuery(con3, "select * from test") Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4...
2000 Nov 15
1
RODBC
...me yet to look at it ... I looked into the source to no avail. I'll have to dive in ODBC library mysteries (which are pure Swahili to me ...), and did not yet had time for this. <OffTheTopOfMyHeadIDontHaveTheFilesOnHand> In interim, you can uncomment the old (much less efficient) of the odbcQuery routine, which does *not* exhibit this bug. Data are correct, speed seriously sucks ... </OffTheTopOfMyHeadIDontHaveTheFilesOnHand> 3) If you happen to use PostgreSQL, the RPgSql package (also on CRAN) is much more interesting : it allows direct access to PostgreSQL classes (tables) as R obj...