Meindert wrote:
We don't use version 5.0.4 not that long and the user defined table types are the last types we added, but that is already a while ago. Where can I find the stack trace?
More info you can find in the attachments!
Ah you saw the error in the log. Next time, please provide as much info as possible so we don't have to play a guessing game.
The application output window docked at the bottom should have a line which states which type was the problem, in the format: "Exception caught while instantiating UDT type '{0}' from assembly '{1}': {2}. Type skipped."
If you don't see this line, but do see the log, something else is going on: it failed during the query below. In that case please try to load the data from that query in a datatable using a simple SqlDataAdapter.Fill operation. That should then give the same error.
We first execute the following query on the catalog
SELECT * FROM sys.assembly_types
this gives a list of types and assemblies.
Now for each of these assemblies, we'll try to instantiate the type with a simple:
udt.TypeInstance = Type.GetType(udt.FullAssemblyName);
This fails if the assembly isn't loadable on the client, i.e. you don't have the assembly stored locally.
Your UDTs seem simple redefines so that doesn't seem to be it. If the query above reveals an assembly which is stored local but you can't instantiate a type from that, that's the reason.
Still, the error is odd, as it occurs likely due to GetType() which is a .net action. Why that can't instantiate a type and gives this weird error, I don't know. If you don't use any of the .NET types installed in your catalog, you can safely ignore this error.