Hi all,
I'm using IBatis for .Net for a project and it works well.
I'm now trying to use the feature that allows me to put configuration
infomation out of the
SqlMap.config file using a properties.config file.
I use embedded resources to find my config files so in SqlMap.config I have:
My properties.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<add key="username" value="sa" />
<add key="password" value="password" />
<add key="database" value="DB" />
<add key="datasource" value="sqlexpress" />
</configuration>
<properties embedded="Config.properties.config, MyAssembly" />
And than, as reported in the documentation:
<database>
<provider name="sqlServer2.0"/>
<dataSource name="ProgettoAttivita"
connectionString="data source=${datasource};
database=${database};
user id=${username};
password=${password};"/>
</database>
But when I run the project IBatis searches for a datasource named "datasource"
rather than
"sqlexpress" and tries to access to it with an user called "username" rather
than "sa".
It seems it doesn't use the defined properties or that it doesn't find them
using the ${} syntax.
Can someone help me with this issue?
Thanks in advance.
--
Andrea Colleoni