ibatitsnet 因为会Dao.config 配置数据版本太低导致的问题

ProjectReview.Test.SqlMapTest.TestSqlMap:
IBatisNet.Common.Exceptions.ConfigurationException :
- The error occurred while configure DaoSessionHandler.
- The error occurred in <property name="resource" value="App_Data\sqlMap.config" xmlns="http://ibatis.apache.org/dataAccess" />.
- Check the IBatisNet.DataAccess.DaoSessionHandlers.SqlMapDaoSessionHandler.
----> IBatisNet.Common.Exceptions.ConfigurationException : DaoManager could not configure SqlMapDaoSessionHandler.Cause:
- The error occurred while loading SqlMap.
- loading insert tag
- The error occurred in <sqlMap embedded="PengeSoft.RFS.Maps.FileData.xml,PengeSoft.RFS" xmlns="http://ibatis.apache.org/dataMapper" />.
- Check the InsertFileData.
----> IBatisNet.Common.Exceptions.ConfigurationException :
- The error occurred while loading SqlMap.
- loading insert tag
- The error occurred in <sqlMap embedded="PengeSoft.RFS.Maps.FileData.xml,PengeSoft.RFS" xmlns="http://ibatis.apache.org/dataMapper" />.
- Check the InsertFileData.
----> System.ArgumentException : 未找到请求的值“image”。

解决方案: map 文件中会用到 dbType="image"   是因为Dao.config 中有的<provider name="OleDb2.0"/> 改成:<provider name="sqlServer2.0"/>

<database>
<provider name="OleDb2.0"/>
<dataSource name="dbName" connectionString="Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ID=sa;Initial Catalog=dbName;Data Source=local"/>
</database>

 

下面这个解决方法:原因是Provider=SQLOLEDB.1; 将其去掉就Ok 了


ProjectReview.Test.RFSServiceTest.AddFileFormiYstByRFS:
IBatisNet.DataAccess.Exceptions.DataAccessException : DaoProxy : unable to intercept method name 'GetDetail', cause : 不支持关键字: “provider”。
----> System.ArgumentException : 不支持关键字: “provider”。

转载于:https://www.cnblogs.com/xiaoruilin/p/5547609.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值