报错语句:
Database db = DatabaseFactory.CreateDatabase("ConnectionString");
错误提示:
The requested database ConnectionString does not have provider name set in the connection string
web.config里有数据ConnectionString连接串,依然报错。后分析原因,程序以前是sql server的,我转换为oracle,其中可能有东西冲突了
我的解决方法:添加providerName即可!
原语句:<add name="ConnectionString" connectionString="data source=ICS;uid=dhhk_develop;pwd=dhhk_develop" />
更改为:<add name="ConnectionString" connectionString="data source=ICS;uid=dhhk_develop;pwd=dhhk_develop" providerName="System.Data.OracleClient"/>