views:

41

answers:

1

With Sqllite provider,it works.

But with sybase provider,it thows exception.

Exception: Error thrown by a dependency of object 'SybaseAse-12' defined in 'assembly [Spring.Data, Version=1.3.0.20349, Culture=neutral, PublicKeyToken=65e474d141e25e07], resource [Spring.Data.Common.dbproviders.xml] line 1436' : Unsatisfied dependency expressed through constructor argument with index 2 of type [System.Type] : Could not convert constructor argument value [Sybase.Data.AseClient.AseConnection, Sybase.Data.AseClient, Version=1.1.411.0, Culture=neutral, PublicKeyToken=26e0f1529304f4a7] to required type [System.Type] : Cannot convert property value of type [System.String] to required type [System.Type] for property ''. while resolving 'constructor argument with name dbmetadata' to 'Spring.Data.Common.DbMetadata#14D1AFD' defined in 'assembly [Spring.Data, Version=1.3.0.20349, Culture=neutral, PublicKeyToken=65e474d141e25e07], resource [Spring.Data.Common.dbproviders.xml] line 1436'

I use Sybase.Data.AseClient.dll v1.1.510, but I find the default Sybase-12 use v1.1.411, dose it matter?

A: 

Have you tried adding a bindingRedirect to your app/web.config?

For example:

<dependentAssembly>
  <assemblyIdentity name="Sybase.Data.AseClient" publicKeyToken="65e474d141e25e07"/>
  <bindingRedirect oldVersion="1.1.411" newVersion="1.1.510"/>
</dependentAssembly>
Eric