Home > Database > Mysql Tutorial > body text

C# Using MySQL_MySQL

WBOY
Release: 2016-06-01 13:35:53
Original
1173 people have browsed it

bitsCN.com

Configuration of MySQL on C# project.

1. Download the assembly from MySQL binary on installing MySQL connector .NET

2. Copy it to your project’s build out directory, such as ‘$ProjectDIR/Bin/Debug’

3. Add the assembly into your solution on “Add Reference…”

4. Add ‘using MySQL.Data’ namespace in your code.

Common Error

Configuration system failed to initialize

Please check syntax in the app.config.  The format for using connectionstring in app.config should be like below:

<configuration><br>  <connectionstrings><br>    <add name="Northwind"></add>         providerName="System.Data.SqlClient"<br>         connectionString="server=(local);integrated security=SSPI;database=Northwind" /><br>  </connectionstrings><br></configuration>
Copy after login

Unable to find the requested .Net Framework Data Provider.  It may not be installed.

MySql “找不到请求的 .Net Framework 数据提供程序。可能没有安装。”

需要在app.config或者web.config中添加下面的配置项


   
       
   

bitsCN.com
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!