ASP .NET-配置SQLDataSource以使用MySQL .NET连接器 [英] ASP .NET - Configure SQLDataSource to use MySQL .NET Connector

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

问题描述

我正在使用VS 2008.

I am using VS 2008.

在论坛/堆栈中四处浏览并没有提供有关如何将MySQL与ASP.NET站点一起使用的明确答案.

Looking around on the forums/stack hasn't provided a clear answer on how to use MySQL with a ASP .NET site.

如何通过使用MySQL Connector NET提供程序将SQLDataSource配置为使用MySQL?

How do I configure a SQLDataSource to use MySQL by using the MySQL Connector NET provider?

我不希望使用ODBC驱动程序-我可以开始使用它.该连接器已添加为对项目的引用,并在web.config中显示为:

I would prefer not to use the ODBC driver - which I can get working. The connector has been added as a reference to the project and appears in the web.config as:

<add assembly="MySql.Data, Version=5.2.2.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>

我还尝试在以下位置手动创建一个部分:

And I also attempted to manually create a section under :

<add name="MYSQL" connectionString="Server=localhost;Database=data;Uid=root;Pwd=1234;" providerName="MySql.Data" />

我拥有的MySQL Connector版本是5.2.2.0

The MySQL Connector version that I have is 5.2.2.0

推荐答案

MySQl和ASP.NET教程

也许这会有所帮助?

这篇关于ASP .NET-配置SQLDataSource以使用MySQL .NET连接器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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