C# Using MySQL_MySQL
程序员文章站
2022-04-27 10:07:25
...
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:
providerName="System.Data.SqlClient"
connectionString="server=(local);integrated security=SSPI;database=Northwind" />
Unable to find the requested .Net Framework Data Provider. It may not be installed.
MySql “找不到请求的 .Net Framework 数据提供程序。可能没有安装。”
需要在app.config或者web.config中添加下面的配置项
推荐阅读
-
C#基于QRCode实现动态生成自定义二维码图片功能示例
-
C#实现的上传图片、保存图片、加水印、生成缩略图功能示例
-
【转载】C#防SQL注入过滤危险字符信息
-
.NET Core / C# 开发 IOT 嵌入式设备的个人见解
-
C#使用RichTextBox实现替换文字及改变字体颜色功能示例
-
C#实现清除IE浏览器缓存的方法
-
C#异步调用实例小结
-
C#获取所有SQL Server数据库名称的方法
-
C#实现的UDP收发请求工具类实例
-
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...