Is it your use of 'con' rather than 'con2' in dbSendQuery? -Kevin -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marc Moragues Sent: Tuesday, December 18, 2007 1:14 PM To: r-help@r-project.org Subject: [R] R brakes when submitting a query to MySQL
Hello, I would like to retrieve data stored in MySQL database, so I installed RMySQL package. I can successfully connect with the my database using the following code > dvr<-dbDriver("MySQL") > con2<-dbConnect(dvr,group="exbardiv") > mysqlDescribeConnection(con2) <MySQLConnection:(972,0)> User: mmorag Host: localhost Dbname: exbardiv Connection type: localhost via TCP/IP No resultSet available I can even see the tables in the database > dbListTables(con2) [1] "agoueb" "high_ld" "rescue" "sjlc_info" "sjlc_ld" "temp" [7] "temp_snp1" "temp_snp2" However, when I try to query the database, R breakes. res<-dbSendQuery(con,'select * from sjlc_ld') Can anyone help me tune up the connection between R and MySQL? Thank you, Marc. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ SCRI, Invergowrie, Dundee, DD2 5DA. The Scottish Crop Research Institute is a charitable company limited by guarantee. Registered in Scotland No: SC 29367. Recognised by the Inland Revenue as a Scottish Charity No: SC 006662. DISCLAIMER:\ \ This email is from the Scottish Crop Rese...{{dropped:30}} ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.