I did it
<?xml version="1.0" encoding="UTF-8" ?>
<sqlMap namespace="Customer"
xmlns="http://ibatis.apache.org/mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<resultMaps>
<resultMap id="customer-result" class="Customer" >
<result property="Id" column="CustomerID"/>
<result property="CompanyName" column="CompanyName"/>
<result property="ContactName" column="ContactName"/>
<result property="ContactTitle"
column="ContactTitle"/>
</resultMap>
</resultMaps>
<statements>
<select id="GetAAAAA" resultMap="customer-result" >
select TOP 1 CustomerID, CompanyName, ContactName ,
ContactTitle from customers
</select>
</statements>
</sqlMap>
But i still have this error message
Une exception non gérée du type
'IBatisNet.Common.Exceptions.ConfigurationException' s'est produite dans
ibatisnet.datamapper.dll
Informations supplémentaires :
- The error occurred while loading SqlMap.
- initialize result property: Id
- The error occurred in <sqlMap resource="Customer.xml"
xmlns="http://ibatis.apache.org/dataMapper" />.
- Check the Customer.customer-result.
25/02/2006 12:22:50 [INFO]
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder - Add property
"userid" value "sa"
25/02/2006 12:22:50 [INFO]
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder - Add property
"password" value "XXXX"
25/02/2006 12:22:50 [INFO]
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder - Add property
"database" value "Northwind"
25/02/2006 12:22:50 [INFO]
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder - Add property
"datasource" value "(local)"
25/02/2006 12:22:50 [INFO]
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder - Add property
"useStatementNamespaces" value "false"
Le programme '[1336] iBatisWnApp.exe' s'est arrêté avec le code 0 (0x0).
Gilles Bayon a écrit :
You set a CacheModel but the statements
(UpdateAccountViaInlineParameters, UpdateAccountViaParameterMap) are
not defined
Remove the cachemodel tag .