本人最近才开始接触ibatisnet,不幸在配置的时候就遇到了问题.我现在在项目中只想使用DataAccess,不想用SqlMap,因为我只想用ibatis解决事务方面的问题,这样的话我是不是只需要配置dao.config就可以了?我现在的配置文件如下:
<?xml version="1.0" encoding="utf-8"?>
<daoConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="DaoConfig.xsd">
<properties resource="providers.config"/>
<context name="SqlMapDao" default="true">
<database>
<provider name="sqlServer1.1"/>
<dataSource name="OPoll" connectionString="server=localhost;database=opoll;uid=sa;pwd=;connection reset=false;connection lifetime=5; min pool size=1; max pool size=50"/>
</database>
</context>
</daoConfig>在调用下面代码时总是报错
DaoManager.ConfigureAndWatch( handler );
错误:最有可能的“IBatisNet.Common.Exceptions.ConfigurationException”类型的异常出现在 ibatisnet.dataaccess.dll 中
其他信息: Error while configuring the Provider named "sqlServer1.1" in the Context named "SqlMapDao".
<?xml version="1.0" encoding="utf-8"?>
<daoConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="DaoConfig.xsd">
<properties resource="providers.config"/>
<context name="SqlMapDao" default="true">
<database>
<provider name="sqlServer1.1"/>
<dataSource name="OPoll" connectionString="server=localhost;database=opoll;uid=sa;pwd=;connection reset=false;connection lifetime=5; min pool size=1; max pool size=50"/>
</database>
</context>
</daoConfig>在调用下面代码时总是报错
DaoManager.ConfigureAndWatch( handler );
错误:最有可能的“IBatisNet.Common.Exceptions.ConfigurationException”类型的异常出现在 ibatisnet.dataaccess.dll 中
其他信息: Error while configuring the Provider named "sqlServer1.1" in the Context named "SqlMapDao".
解决方案 »
- c#处理toolStripStatusLabel1的时候,怎么不能及时显示?
- 如何同时更新数据库表中的两个字段(sql数据库)
- 点右上角的关闭,但是进程还是在,请问如何彻底关闭呀?
- 软件授权方式的技术实现讨论
- 我一个继承于Control自定义控件,总是收不到KeyPress事件,怎么回事啊?
- 报表已做好,但如何调用报表,请各兄弟帮忙啊
- 高手们ERP数据库一般怎么做?谢谢,散分。
- .NET 下使用Win32 API 有哪几种方法?
- 高分请教datagrid的源码下载
- 盼高手出手相救!在C#WinForm编程中,如何在一个窗体调用另一个窗体实例化后的类!!!
- 怎么设置客户区大小?
- 正在准备关于"面向对象"的讲座
"需要绝对路径"
<daoConfig xmlns="http://ibatis.apache.org/dataAccess"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <providers resource="providers.config"/>
<context id="SqlMapDao" default="true">
<!-- ==== Sql Server : SqlClient configuration ========= -->
<database>
<provider name="sqlServer1.1"/>
<dataSource name="SqlServer" connectionString="data source=(local)\NetSDK;database=NPetshop;user id=NPetshop;password=ibatisnet;connection reset=false;connection lifetime=5; min pool size=1; max pool size=50"/>
</database>
</context>
</daoConfig>开始说的版本问题是指DataAccess.dll的版本.
呵呵,我也觉得.这个是为了照顾以前的部分代码.