简体   繁体   English

MySql Visual Studio 2017(错误:您已经有一个可用的连接)

[英]MySql Visual Studio 2017 (Error: You have a usable connection already)

I'm using Visual Studio 2017 and these are the errors I encountered when I drag my table to the dataset :我正在使用 Visual Studio 2017,这些是我将表拖到dataset时遇到的错误:

Some updating commands could not be generated automatically.某些更新命令无法自动生成。 The database returned the following error:数据库返回以下错误:

You have a usable connection already.您已经有一个可用的连接。

在此处输入图片说明

Mouse drag operation failed.鼠标拖动操作失败。

Could not retrieve schema information for table or view access_rights ..无法检索表或视图的架构信息access_rights ..

在此处输入图片说明

This is my setup currently installed:这是我当前安装的设置:

  • MySQL Connector C++ 8.0 MySQL 连接器 C++ 8.0
  • MySQL Connector J MySQL 连接器 J
  • MySQL Connector Net 8.0.15 MySQL 连接器网络 8.0.15
  • MySQL Connector/ODBC 8.0 MySQL 连接器/ODBC 8.0
  • MySQL Documents 8.0 MySQL 文档 8.0
  • MySQL Examples and Samples 8.0 MySQL 示例和示例 8.0
  • MySQL for Visual Studio 1.2.8用于 Visual Studio 1.2.8 的 MySQL
  • MySQL Installer - Community MySQL 安装程序 - 社区
  • MySQL Router 8.0 MySQL 路由器 8.0
  • MySQL Server 8.0 MySQL 服务器 8.0
  • MySQL Shell 8.0.15 MySQL 外壳 8.0.15
  • MySQL Workbench 8.0 CE MySQL 工作台 8.0 CE

I already tried this:我已经试过了:

  • Visual Studio 2017 (Community, Professional, and Enterprise): Visual Studio 2017(社区、专业和企业):

    MySQL for Visual Studio 1.2.8 or 2.0.5 with Connector/NET 6.9.8 MySQL for Visual Studio 1.2.8 或 2.0.5 with Connector/NET 6.9.8

I already solve this i saw a random answer from another website我已经解决了这个问题我从另一个网站上看到了一个随机答案

Important重要的

Uninstall both Mysql for VS and Connector/net and you must first install Mysql for VS before connector/net卸载Mysql for VS 和Connector/net,你必须先安装Mysql for VS,然后再安装connector/net

and it works properly now现在它可以正常工作

I was struggling with this for hours.我为此苦苦挣扎了几个小时。 I used the advice in another 2015 VS post.我在另一篇 2015 VS 帖子中使用了该建议。

Uninstalled MySQL Connector Net and MySQL for Visual Studio卸载 MySQL Connector Net 和 MySQL for Visual Studio

Installed MySQL Connector Net 6.9.8已安装 MySQL Connector Net 6.9.8

Installed MySQL for Visual Studio 1.2.7为 Visual Studio 1.2.7 安装 MySQL

And it worked after that.在那之后它起作用了。 I think it is important to install the connector before the visual studio.我认为在 Visual Studio 之前安装连接器很重要。 The latest version are not friendly and you need to downgrade.最新版本不友好,需要降级。

Job Fine for me in Visual Studio 2019:在 Visual Studio 2019 中对我来说很好:

Uninstall MySQL Connector Net and MySQL for Visual Studio卸载 MySQL Connector Net 和 MySQL for Visual Studio

Installed MySQL Connector Net 8.0.19 (Install this first)安装 MySQL Connector Net 8.0.19(先安装这个)

Installed MySQL for Visual Studio 1.2.9 (Install last)为 Visual Studio 1.2.9 安装 MySQL(最后安装)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM