码迷,mamicode.com
首页 > 数据库 > 详细

【Rmarkdown rmysql】

时间:2015-10-09 11:42:39      阅读:242      评论:0      收藏:0      [点我收藏+]

标签:

http://stackoverflow.com/questions/21167070/how-to-query-multiple-times-and-close-the-connection-at-the-end

使用query1=dbSendQuery(db, "select * from table1")

会出现

Error in mysqlExecStatement(conn, statement, ...) : RS-DBI driver: (connection with pending rows, close resultSet before continuin

的错误,解决方案是

query1=dbGetQuery(db, "select * from table1")

Because:

The function ‘dbGetQuery’ does all these in one operation (submits the statement, fetches all output records, and clears the result set).

 

【Rmarkdown rmysql】

标签:

原文地址:http://www.cnblogs.com/colipso/p/4863286.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!