Hello all.
I am pretty newbie with ibatis and i am trying to get following working
Our technical environment:
- visual studio 05 (.NET 2.0)
- ms sql server 05
Well, i am trying to connect to the database and ibatis is saying that i -->
{"\n- The error occurred while load DataBase Provider.\n- The error occurred in <provider name=\"sqlServer2.0\" />. \n- Check the sqlServer2.0."}.
I have created a new definition (sqlServer2.0) to providers.config which should provide access to SQL Server 05. I use this definition in my sqlMap.config file, but when i try to create instance from DataMapper the previous exception / message is displayed.
Can anyone tell me what seems to be the problem here, because i just cant understand it?
Here are my config files:
providers.config
<?xml version="1.0" encoding="utf-8"?>
<providers
xmlns="http://ibatis.apache.org/providers"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<clear/>
<provider
name="sqlServer2.0"
enabled="true"
assemblyName="System.Data, Version=2.0.50215.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
connectionClass="System.Data.SqlClient.SqlConnection"
commandClass="System.Data.SqlClient.SqlCommand"
parameterClass="System.Data.SqlClient.SqlParameter"
parameterDbTypeClass="System.Data.SqlDbType"
parameterDbTypeProperty="SqlDbType"
dataAdapterClass="System.Data.SqlClient.SqlDataAdapter"
commandBuilderClass=" System.Data.SqlClient.SqlCommandBuilder"
usePositionalParameters = "false"
useParameterPrefixInSql = "true"
useParameterPrefixInParameter = "true"
parameterPrefix="@"
/>
and sqlMap.config
<?xml version="1.0" encoding="utf-8"?>
<sqlMapConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="SqlMapConfig.xsd">
<!-- Optional -->
<!--<properties resource="properties.config"/>-->
<settings>
<setting useStatementNamespaces="false"/>
<setting cacheModelsEnabled="true"/>
<setting validateSqlMap="false"/>
</settings>
<!-- Not required if providers.config is located in default location -->
<!-- <providers embedded="resources.providers.config, IBatisNet.Test"/> -->
<database>
<provider name="sqlServer2.0"/>
<dataSource name="ProductDevelopmentApplication"
connectionString="Data Source=IHQSMSSQL101\EBS;Initial Catalog=ECKER_NPDA;Integrated Security=true;"/>
</database>
<alias>
<typeAlias alias="Account" type="IBatisNet.Test.Domain.Account, IBatisNet.Test"/>
<typeAlias alias="YesNoBool" type="IBatisNet.Test.Domain.YesNoBoolTypeHandlerCallback, IBatisNet.Test"/>
</alias>
<typeHandlers>
<typeHandler type="bool" dbType="Varchar" callback="YesNoBool"/>
</typeHandlers>
<sqlMaps>
<sqlMap resource="${root}App_code\entity\Product.xml"/>
<!--<sqlMap resource="${root}Maps/Category.xml"/>
<sqlMap resource="${root}Maps/Product.xml"/>-->
</sqlMaps>
</sqlMapConfig>
Sincerely Timo

