您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 销售管理 > 访问各数据库的providerName各驱动
如果为Mysql数据库---providerName=MySql.Data.MySqlClient(没装mysqldotnet安装版的话就得在C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/CONFIG中machine.config加语句了)在machine.config文件中有这么一段,如果没有name=MySQLDataProvider则会出现这种错误。system.dataDbProviderFactoriesaddname=OdbcDataProviderinvariant=System.Data.Odbcdescription=.NetFrameworkDataProviderforOdbctype=System.Data.Odbc.OdbcFactory,System.Data,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089/addname=OleDbDataProviderinvariant=System.Data.OleDbdescription=.NetFrameworkDataProviderforOleDbtype=System.Data.OleDb.OleDbFactory,System.Data,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089/addname=OracleClientDataProviderinvariant=System.Data.OracleClientdescription=.NetFrameworkDataProviderforOracletype=System.Data.OracleClient.OracleClientFactory,System.Data.OracleClient,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089/addname=SqlClientDataProviderinvariant=System.Data.SqlClientdescription=.NetFrameworkDataProviderforSqlServertype=System.Data.SqlClient.SqlClientFactory,System.Data,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089/addname=SQLServerCEDataProviderinvariant=Microsoft.SqlServerCe.Clientdescription=.NETFrameworkDataProviderforMicrosoftSQLServer2005MobileEditiontype=Microsoft.SqlServerCe.Client.SqlCeClientFactory,Microsoft.SqlServerCe.Client,Version=9.0.242.0,Culture=neutral,PublicKeyToken=89845dcd8080cc91/addname=MySQLDataProviderinvariant=MySql.Data.MySqlClientdescription=.NetFrameworkDataProviderforMySQLtype=MySql.Data.MySqlClient.MySqlClientFactory,MySql.Data,Version=5.0.2.0,Culture=neutral,PublicKeyToken=c5687fc88969c44d//DbProviderFactories/system.data如果为Aceess数据库---providerName=System.Data.OleDb如果为Oracle数据库---providerName=System.Data.OracleClient或者providerName=Oracle.DataAccess.Client如果为SQLite数据库---providerName=System.Data.SQLite如果为sql数据库---providerName=System.Data.SqlClient
本文标题:访问各数据库的providerName各驱动
链接地址:https://www.777doc.com/doc-2025436 .html