一个比较简单的问题,^_^,请大家帮忙

4 views
Skip to first unread message

Hufazhi

unread,
Aug 1, 2006, 10:07:35 PM8/1/06
to Ibatisnet用户组
我刚开始看ibatisnet
按照网上的例子做一个简单的查询的应用
我新建了一个windows应用程序项目,添加了对iBatisNet.Common、
iBatisNet.DataAccess、iBatisNet.DataMapper等dll。
然后在bin的ebug底下建了一个SqlMap.Config和一个person.xml
然后在程序的button的click事件里面:

dataGrid1.DataSource=IBatisNet.DataMapper.Mapper.Instance().QueryForList("SelectAll",null);
在运行的时候,点击button按钮,报错如下:

未处理的"IBatisNet.Common.Exceptions.ConfigurationException"类型的异常出现在
ibatisnet.datamapper.dll 中。

其他信息:
- The error occurred while Validate SqlMap config.
- The error occurred in 无法为命名空间""加载架构 -
未能找到文件"D:\MyProject\WindowsApplication2\bin\Debug\SqlMapConfig.xsd"。。
, (1, 2)处发生了错误。
未声明"sqlMapConfig"元素。 , (1, 2)处发生了错误。
未声明"providers"元素。 , (1, 119)处发生了错误。
未能找到属性"file"的架构信息。 , (1,
129)处发生了错误。
未声明"settings"元素。 , (1, 156)处发生了错误。
未声明"setting"元素。 , (1, 166)处发生了错误。
未能找到属性"useFullyQualifiedStatementNames"的架构信息。
, (1, 174)处发生了错误。
未声明"setting"元素。 , (1, 217)处发生了错误。
未能找到属性"cacheModelsEnabled"的架构信息。 , (1,
225)处发生了错误。
未声明"database"元素。 , (1, 265)处发生了错误。
未声明"provider"元素。 , (1, 275)处发生了错误。
未能找到属性"name"的架构信息。 , (1,
284)处发生了错误。
未声明"dataSource"元素。 , (1, 316)处发生了错误。
未能找到属性"name"的架构信息。 , (1,
327)处发生了错误。
未能找到属性"connectionString"的架构信息。 , (1,
345)处发生了错误。
未声明"sqlMaps"元素。 , (1, 513)处发生了错误。
未声明"sqlMap"元素。 , (1, 522)处发生了错误。
未能找到属性"resource"的架构信息。 , (1,
529)处发生了错误。
.

Jason820

unread,
Aug 9, 2006, 6:18:09 AM8/9/06
to Ibatisnet用户组
- The error occurred while Validate SqlMap config.
這訊息應該是指你的SqlMap.config的內容有誤

是不是把SqlMap.config的內容貼上來看看ㄚ

Reply all
Reply to author
Forward
0 new messages