Error while configuring the Provider named “MySql“. Cause : The provider is not in ‘providers.config

2022/2/24 19:26:47

本文主要是介绍Error while configuring the Provider named “MySql“. Cause : The provider is not in ‘providers.config,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

使用.NET+IBatics.net连接Mysql时,提示错误:
Error while configuring the Provider named “MySql”. Cause : The provider is not in 'providers.config

经过查找总结方法如下:
1、下载一个Mysql.Data.dll,并引用;
2、修改Provider.config文件,看是否存在MySql的配置项目,如果没有则添加。
3、将Provider.config文件中MySql的配置设置:enabled=“true”
4、检查下载的dll文件与配置项是否一致,不一致则修改配置。
完整的配置项如下:

  <provider
		name="MySql"
		description="MySQL, MySQL provider V8.0.20.0"
		enabled="true"
		assemblyName="MySql.Data, Version=8.0.20.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"
		connectionClass="MySql.Data.MySqlClient.MySqlConnection"
		commandClass="MySql.Data.MySqlClient.MySqlCommand"
		parameterClass="MySql.Data.MySqlClient.MySqlParameter"
		parameterDbTypeClass="MySql.Data.MySqlClient.MySqlDbType"
		parameterDbTypeProperty="MySqlDbType"
		dataAdapterClass="MySql.Data.MySqlClient.MySqlDataAdapter"
		commandBuilderClass="MySql.Data.MySqlClient.MySqlCommandBuilder"
		usePositionalParameters = "false"
		useParameterPrefixInSql = "true"
		useParameterPrefixInParameter = "true"
		parameterPrefix="@"
	/>


这篇关于Error while configuring the Provider named “MySql“. Cause : The provider is not in ‘providers.config的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程