我已经下载并安装了连接器,但它没有出现在 .Net 选项卡中。那我现在该怎么办?
第一次警告:
Namespace or type specified in the Imports 'MySql.Data.MysqlClient' doesn't contain any public member or cannot be found. Make sure namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
第二次警告:
This primary reference "MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL"could not be resolved because it has as indirect dependency on the .NET Framework assembly "Accessibility, Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"which has a higher version "4.0.0.0" thanthe version "2.0.0.0" in the current target framework.
最佳答案
在项目属性中将 .NET Framework 的目标版本更改为 .NET 4.0。这应该可以解决两个警告,因为它将清除第二个警告,这将使引用的程序集与导入的命名空间一起使用。
关于mysql - vb无法连接数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27079882/