MySQL连接器-MultipleActiveResultSets问题 [英] Mysql connector - MultipleActiveResultSets issue

查看:715
本文介绍了MySQL连接器-MultipleActiveResultSets问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我花了几个小时寻找解决方法-也许我只需要另一只眼睛就可以解决这个问题.

First off, I have spent hours looking for a fix - maybe I just need another pair of eyes on this problem.

我目前正在为自己编写一个c#应用程序(供个人使用).我正在从mysql.com运行最新的MySQL连接器库

I'm currently coding a c# application for myself(Personal use). Im running the latest MySQL connector library from mysql.com

我的连接字符串是

public string SQLConnection = "Server=localhost;Database=data;Uid=root;Pwd=ascent;charset=utf8;MultipleActiveResultSets=True;";

我的问题与MultipleActiveResultSets=True;有关.当这包含在我的SQLConnection字符串中时,MySQL库将无法连接.查看下面的图片以查看我的发现

My issue is regarding MultipleActiveResultSets=True; . When this is included in my SQLConnection string the MySQL library is unable to connect. View the pic below to view my findings

完整图片: http://i62.tinypic .com/25a57p1.png

当从连接字符串中删除MultipleActiveResultSets=True;时,我得到了这个结果

When MultipleActiveResultSets=True; is removed from the connection string, I get this result

完整图片: http://i58.tinypic .com/2useaom.png

我成功建立了联系.

MultipleActiveResultSets的原因是因为我同时使用2个MySqlDataReader-但是无法更改.

The reason for MultipleActiveResultSets is because I'm using 2 MySqlDataReader at the same time - This however can't be changed.

如果有人知道为什么失败,那么请提出修复建议.

If anyone knows why this is failing, then please suggest your fix.

我的本​​地MySQL服务器版本:5.6.17

My local MySQL server version: 5.6.17

推荐答案

我认为MySql连接器不支持MARS(多个活动结果集).在这种情况下,您不能同时在多个地方使用它.

I assume MySql connector doesn't support MARS (Multiple active result sets). In such case you cannot use it at more than one place at the same time.

这篇关于MySQL连接器-MultipleActiveResultSets问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆