我如何添加引用的.NET MySQL连接?NET、MySQL

2023-09-02 11:47:59 作者:衾

这是什么意思: 接下来添加引用:MySql.Data 的

其实我已经下载的MySQL Connector /网。 按照以下说明:

首先,您需要安装的MySQL Connector / NET,它位于:的 http://dev.mysql.com/downloads/connector/net/1.0.html

接下来创建一个新的项目

接下来添加引用:MySql.Data

接下来添加使用MySql.Data.MySqlClient;  但林不能够安装连接。

网站: http://bitdaddys.com/MySQL-ConnectorNet.html

解决方案

添加引用MySql.Data.dll意味着你需要添加库引用到下载的连接器。 IDE将连接数据库连接库与您的应用程序时,它编译。

步骤分步示例

我下载的二进制(没有安装)拉链从MySQL的Web站点,提取到桌面软件包,并做了以下内容:

创建在Visual Studio中的一个新的项目 在Solution Explorer中,在项目名称,找到引用并在其上单击鼠标右键。选择添加引用。 在添加引用对话框,切换到浏览选项卡,然后浏览到包含下载连接的文件夹。导航到bin文件夹,然后选择MySql.Data.dll文件。单击确定。 在您的code顶部添加使用MySql.Data.MySqlClient; 。如果您已经添加正确的引用,智能感知应该提供完成这个给你。

What does this mean: Next add reference to: MySql.Data

actually I have downloaded mysql connector/net. by following these instructions:

在VB.NET应用中使用MySQL的方法

First, you need to install the mysql connector/net, it is located at: http://dev.mysql.com/downloads/connector/net/1.0.html

Next create a new project

Next add reference to: MySql.Data

Next add "using MySql.Data.MySqlClient;" but im not able to install the connector.

website:http://bitdaddys.com/MySQL-ConnectorNet.html

解决方案

"Add a reference to MySql.Data.dll" means you need to add a library reference to the downloaded connector. The IDE will link the database connection library with your application when it compiles.

Step-by-Step Example

I downloaded the binary (no installer) zip package from the MySQL web site, extracted onto the desktop, and did the following:

Create a new project in Visual Studio In the Solution Explorer, under the project name, locate References and right-click on it. Select "Add Reference". In the "Add Reference" dialog, switch to the "Browse" tab and browse to the folder containing the downloaded connector. Navigate to the "bin" folder, and select the "MySql.Data.dll" file. Click OK. At the top of your code, add using MySql.Data.MySqlClient;. If you've added the reference correctly, IntelliSense should offer to complete this for you.

 
精彩推荐
图片推荐