[R] R brakes when submitting a query to MySQL
Marc Moragues
Marc.Moragues at scri.ac.uk
Tue Dec 18 19:35:38 CET 2007
You are right, it was a mistake copying and pasting the code. There is
no error message from R when I run con2. I get a Windows error message
saying "R for windows terminal front-end has encountered a problem and
need to close".
The error signature is:
AppName: rterm.exe AppVer: 2.60.43063.0 ModName: msvcrt.dll
ModVer: 7.0.2600.2180 Offset: 000378c0
Marc.
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of Zembower, Kevin
Sent: 18 December 2007 18:18
To: r-help at r-project.org
Subject: Re: [R] R brakes when submitting a query to MySQL
Is it your use of 'con' rather than 'con2' in dbSendQuery? -Kevin
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of Marc Moragues
Sent: Tuesday, December 18, 2007 1:14 PM
To: r-help at 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 at 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.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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 Research Institute, but the views
expressed by the sender are not necessarily the views of SCRI and its
subsidiaries. This email and any files transmitted with it are confidential
to the intended recipient at the e-mail address to which it has been
addressed. It may not be disclosed or used by any other than that addressee.
If you are not the intended recipient you are requested to preserve this
confidentiality and you must not use, disclose, copy, print or rely on this
e-mail in any way. Please notify postmaster at scri.ac.uk quoting the
name of the sender and delete the email from your system.
Although SCRI has taken reasonable precautions to ensure no viruses are
present in this email, neither the Institute nor the sender accepts any
responsibility for any viruses, and it is your responsibility to scan the email
and the attachments (if any).
More information about the R-help
mailing list