Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataReader.GetFieldType(68) returned null
Message
De
16/08/2013 11:32:04
 
 
À
06/08/2013 16:52:26
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01579975
Message ID:
01580632
Vues:
44
If I bounce off the Web site against a SQL Server 2008 database, I need to drop a copy of Microsoft.SqlServer.Types.dll in the Bin directory. As is, it will work. I still do not understand why I would have to do this as the SQL Server should have everything it needs to handle the spatial data type at its level. Why do I need to add this on the Web server?

On the other servers, running against a SQL Server 2008 database, I didn't have to do that.

Additionnally to that, I brought in the library of SQL Server 2012 Microsoft.SqlServer.Types.dll file instead in the Bin directory. As is, it will not work, as by default, the .NET framework 4.0 will always try to use the SQL Server 2008 Microsoft.SqlServer.Types.dll file. So, in this case, some says to update the Web.config file to include a reference to that assembly. Having it there seems to be the way to force the .NET framework to use the SQL Server 2012 Microsoft.SqlServer.Types.dll file but it isn't.

Here is my Web.config file section of the assembly I added:
<assemblies>
   <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
   <add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
   <add assembly="Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
</assemblies>
By default, the 3rd assembly was not there. I added it in here to force that. But, in the error log, it still says:

"Could not load file or assembly 'Microsoft.SqlServer.Types, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

So, we can easily see that it still tries to handle the spatial data type with the SQL Server 2008 version of that file instead of taking the one I put in the Bin directory.

Anyone would have an answer to those two situations?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform