Loading

asp.net通过web.config连接mysql数据库

1,Download Connector/Net 5.2(odbc) and install

2,  add reference "MySQL.Data.dll"

3,  add connection in web.config file

 

Code

4, get the connection string

Code

 

5, fetch data from database using "using System.Data.Common;"

 

Code

 

 

 

posted @ 2008-09-18 16:37  .net's  阅读(3301)  评论(0编辑  收藏  举报