I spent several days trying to fix this problem but no success so far. I
found some solutions in the mailing list but none of them worked. I'm
using iBatis.Net (IBatis.DataMapper.1.6.2), Visual Studio 2005, and SQL
server 2005. The problem is that iBatis can't load the provider. This is
my provider in provider.config:

<provider
     name="sqlServer2005"
     enabled="true"
     description="Microsoft SQL Server, provider V2.0.0.0 in framework
.NET V2.0" 
     assemblyName="System.Data, Version=2.0.0.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="@"
     allowMARS="true"
    /> 

I was able to connect to Access using the provider for an Access
database  but It fails with SQL Server 2005. This is the exact error:
Could not configure providers. Unable to load provider named
\"sqlServer2005"\ not found. Cause: The type initializer for
'System.data.sqlClient.SqlConnection' threw an exception. 

I supect it is the version and PublicKeyToken. Have anyone encounter
this problem or know what I need to do to fix it? 

Any help will be appreciated.

Thanks,

Alberto Acevedo 
Computer  Engineer 
US Army CERDEC SED/ABSD
Fort Monmouth , New Jersey 
(732) 532-6191 

Reply via email to