search for: dbdisconnect

Displaying 20 results from an estimated 23 matches for "dbdisconnect".

2006 Mar 06
4
Disconnect all MySQL connections
Hi I''ve got the error "cannot allocate a new connection -- maximum of 16 connections already opened" after I tried to create a new connection to a database. However, the reason ist, that i did not disconnect previous connections.... I don''t know the name of this connections. How can I disconnect this "unknown" connections and drivers? if I delete all
2009 Jan 13
0
crash on multiple queries to postgresql db [solved]
On Mon, Jan 12, 2009 at 6:31 PM, Martin Morgan <mtmorgan at fhcrc.org> wrote: > An off-list guess is, ironically, to NOT call dbDisconnect or gc(). > > The C code in the package registers a ''finalizer'' that gets called when the > object is garbage collected. This is the same code that gets called by > dbDisconnect. Unfortunately, the code does not check to see if it''s been > called already, so...
2010 Nov 01
8
sqldf hanging on macintosh - works on windows
Have a long script that runs fine on windows (32 bit). When I try to run in on two different macs (64 bit), however, it hangs with identical behavior. I start with: library(sqldf) This results in messages: Loading required package: DBI Loading required package: RSQLite Loading required package: RSQLite.extfuns Loading required package: gsubfn Loading required package: proto Loading required
2006 Mar 15
4
"\r" with RSQLite
...10 J > library(RSQLite) > drv <- dbDriver("SQLite") > con <- dbConnect(drv, dbname = "Test") > dbWriteTable(con, "DF", df, row.names = FALSE, overwrite = TRUE) [1] TRUE > df2 <- dbGetQuery(con, "SELECT DISTINCT * FROM DF") > dbDisconnect(con) [1] TRUE > df2 a b 1 1 A\r 2 2 B\r 3 3 C\r 4 4 D\r 5 5 E\r 6 6 F\r 7 7 G\r 8 8 H\r 9 9 I\r 10 10 J\r > sessionInfo() R version 2.2.1, 2005-12-20, i386-pc-mingw32 attached base packages: [1] "methods" "stats" "graphics" &quot...
2006 Mar 15
4
"\r" with RSQLite
...10 J > library(RSQLite) > drv <- dbDriver("SQLite") > con <- dbConnect(drv, dbname = "Test") > dbWriteTable(con, "DF", df, row.names = FALSE, overwrite = TRUE) [1] TRUE > df2 <- dbGetQuery(con, "SELECT DISTINCT * FROM DF") > dbDisconnect(con) [1] TRUE > df2 a b 1 1 A\r 2 2 B\r 3 3 C\r 4 4 D\r 5 5 E\r 6 6 F\r 7 7 G\r 8 8 H\r 9 9 I\r 10 10 J\r > sessionInfo() R version 2.2.1, 2005-12-20, i386-pc-mingw32 attached base packages: [1] "methods" "stats" "graphics" &quot...
2005 May 02
2
RMySQL query: why result takes so much memory in R ?
...and potential solutions. ## my code library(RMySQL) drv <- dbDriver("MySQL") ch <- dbConnect(drv,dbname="testdb", user="root",password="mysql") testdb <- dbGetQuery(ch, "select id, group, measurement from mydata") dbDisconnect(ch) dbUnloadDriver(drv) ## end of my code Cheers Christoph
2003 Feb 06
0
rdbi segmentation fault
...t gives me a segmentation fault library(Rdbi) library(Rdbi.PgSQL) conn <- dbConnect(PgSQL(), dbname = "PGA") tmp <- "create table test ( expid int, name varchar(128));" result <- dbSendQuery(conn,tmp) dbClearResult(result) the last line can be substituted by dbDisconnect(conn) and you get a segmentation fault too. The database PGA does exist and the dbSendQuery does create a table (i checked via psql) i followed the instructions given by tim (see url or msg below) and im sending (what think is) the backtrace: Program received signal SIGSEGV, Segmentation fault....
2004 Feb 10
0
name space conflict using RMySQL and ROracle
...e, unloading and reloading the libraries is no solution... Example: ----------- snip ----------------- library(ROracle) library(RMySQL) mysql <- MySQL() con <- dbConnect(mysql, user=MySQL.name, password=MySQL.pwd, dbname=MySQL.DB, host=MySQL.host) MySQLres <- dbGetQuery(con, MySQL.query) dbDisconnect(con) ora <- Oracle() con <- dbConnect(ora, user=Oracle.name, password=Oracle.pwd, dbname=Oracle.DB) OraRes <- dbGetQuery(con, Ora.query) dbDisconnect(con) ----------- snap ----------------- platform sparc-sun-solaris2.8 arch sparc os solaris2.8 syst...
2003 Jan 24
1
RMySQL performance over RODBC
...ght as how to improve the speed with which RMySQL queries can be processed ? RMySQL database access is done as follows: ------------------------------------------- library(RMySQL) # 1 con <- dbConnect( ... ) # 2 ... rs <- dbSendQuery(con,qry) # 3 rdat <- fetch(rs,n=10000) # 4 ... dbDisconnect(con) # 5 ------------------------------------------- lines #3 and #4 are repeated about 10000 times in the script. Thanks in advance for any help. Sukhaswami Malladi *************************************************************************** The contents of this communication are intended...
2006 Nov 07
3
have I an actual matrix?
...nd plotting it with barplot. Here the code... library(RMySQL) con <- dbConnect(dbDriver ("MySQL"),host=''localhost'',username=''root'',dbname=''ibdona'') rs <- dbGetQuery (con,"select n,year from ibdona.library_location") dbDisconnect(con) Graph <- barplot(rs) And here the error I get... Error in barplot.default(rs) : ''height'' must be a vector or a matrix paste(rs) gives me... [1] "c(307, 65, 2, 28, 3, 229, 81, 5, 7, 558, 134, 53, 9)" [2] "c(2002, 2002, 2002, 2002, 2002, 2003, 2003, 2003,...
2012 Feb 02
14
sqldf for Very Large Tab Delimited Files
Hi All, I have a very (very) large tab-delimited text file without headers. There are only 8 columns and millions of rows. I want to make numerous pieces of this file by sub-setting it for individual stations. Station is given as in the first column. I am trying to learn and use sqldf package for this but am stuck in a couple of places. To simulate my requirement, I have taken iris dataset as an
2005 Mar 09
4
RMySQL installed but not availalable
...t;MySQLDriver" > [1] "dbUnloadDriver" > [1] "dbGetInfo" > [1] "dbListConnections" > [1] "summary" > [1] "MySQLConnection" > [1] "dbConnect" > [1] "dbConnect" > [1] "dbConnect" > [1] "dbDisconnect" > [1] "dbSendQuery" > [1] "dbGetQuery" > [1] "dbGetException" > [1] "dbGetInfo" > [1] "dbListResults" > [1] "summary" > [1] "dbListTables" > [1] "dbReadTable" > [1] "dbWriteTable&qu...
2003 Apr 23
0
MySQL
...rea2", "from ArcticOcean_MYNN", "where month(date)<=3 and empty<465", "group by year(date)", sep=" " ) ); dbDisconnect(con); -- Best regards Wladimir Eremeev mailto:wl at eimb.ru ========================================================================== Research Scientist Leninsky Prospect 33, Space Monitoring & Ecoinformation Systems Sector,...
2005 Jan 13
2
R, postgresql, windows & bsd
I usually work with R on a windows querying data through RODBC from a postgresql db on a freebsd machine on my offcie lan. Now I have the chance to use R also on a linux gentoo client box and to connect to the same db. I know that I can install the unixodbc stuff and stick to RODBC, BUT my question is: Is there any more ''linuxish'' way of querying a postgresql server from a
2011 Mar 16
0
Quantmod getSymbol.MySQL
...se after becoming super user, without user name and password, up-till here everything is fine. library(quantmod) library(RMySQL) con <- dbConnect("MySQL",dbname ="ts") data <- dbReadTable(con,"ACC") tdata=(xts(data[,-1], as.POSIXct(data[,1]))) *barChart(tdata)* dbDisconnect(con) This thing works fine. I mean if done through DBI and RMySQL basic command, then table get read properly and I get a wonderful chart. But doing it through getSymbol is giving problem. *first i tried * setDefaults(getSymbols.MySQL, dbname=''ts'') getSymbols(''ACC'...
2014 Oct 20
0
dbHasCompleted() always returns TRUE for POSTGRES Database with RJDBC?
...SELECT * FROM mtcars WHERE cyl = 4") dbFetch(res) dbClearResult(res) # Fetch in chunks res <- dbSendQuery(con, "SELECT * FROM mtcars") dbHasCompleted(res) ## RETURNS FALSE !!! while (!dbHasCompleted(res)) { chunk <- fetch(res, 10) print(nrow(chunk)) } dbClearResult(res) dbDisconnect(con) ########## My Code, lamentably not reproducible because of needed Postgres-Server, not working ######### # Connect to Postgres-Database res2 <- dbSendQuery(Postgres_con, "select id from mytable limit 1000;" ) dbHasCompleted(res2) ##RE...
2010 Jul 09
6
Compress string memCompress/Decompress
Hello, I would like to compress a long string (character vector), store the compressed string in the text field of a SQLite database (using RSQLite), and then load the text back into memory and decompress it back into the the original string. My character vector can be compressed considerably using standard gzip/bzip2 compression. In theory it should be much faster for me to
2011 Feb 09
3
Insert variable in RMySQL-Statement
Dear list, I''m working with a MySQL-Table and would like to extract selected ids that are stored in a vector: Ids <- c(1,2,3) How do I insert this variable in a for loop like this: For (a in values) { Temp <- dbGetQuery(con, "select * from db Where id = <ID>";) } My problem is to split the select-statement and insert the current id. How can I handle this
2003 Nov 11
0
Installing and Loading RMySQL on OS X 2.8
...nt" [1] "MySQLObject" [1] "MySQLDriver" [1] "dbUnloadDriver" [1] "dbGetInfo" [1] "dbListConnections" [1] "summary" [1] "MySQLConnection" [1] "dbConnect" [1] "dbConnect" [1] "dbConnect" [1] "dbDisconnect" [1] "dbSendQuery" [1] "dbGetQuery" [1] "dbGetException" [1] "dbGetInfo" [1] "dbListResults" [1] "summary" [1] "dbListTables" [1] "dbReadTable" [1] "dbWriteTable" [1] "dbExistsTable" [1] "d...
2013 May 16
2
connect to local mySQL database
Hi, I would like to access a local mysql database. In python using the sqlite3 library it is quite straightforward. I just have to pass the path to the sqlite-file; sqlite3.connect(''.../xy.sqlite'') Is there something similar in R (or specifically in the RMySQL package)? It seems like I have to use the MySQL function in the RMySQL package in order to ... "initializes