English 中文(简体)
为什么来自2008年及以后未在KQ服务器中支持的通用型号的CLR型号?
原标题:Why are CLR Types derived from generics not supported in SQL Server 2008 and later?

下面的法典实施一个通用(经典)的通用(通用理论):

[Serializable]
[Microsoft.SqlServer.Server.SqlUserDefinedType(Format.UserDefined, MaxByteSize = 8000)]
public class udtMassSpectra : SortedDictionary<float, float>, INullable, IBinarySerialize, ICloneable, IDisposable
{
...
}

创建此类(T-SQL):

CREATE TYPE dbo.udtMassSpectra EXTERNAL NAME MassSpectra.udtMassSpectra;

throws an exception:

Msg 10331, Level 16, State 1, Line 1 Type udtMassSpectra in assembly MassSpectra derives from a generic type which is not supported for a CLR Type.

原因何在? 除了在私人成员中藏匿基类外,是否还有其他工作? 该法典于2005年8月5日颁布。

问题回答

另一项建议:

Verify that the type was defined as a class, is not primitive, nested or generic

PS:

就“2005年社会保障部的工作,但不包括2008年社会保障部的工作”而言,我引用了佩特:“你要 l,”。

我没有美国国防军的经验,但也许问题在于该浮游 is能够代表法国航天公司的价值。

我进行了一些研究,并发现了

你们完全可以围绕这一限制开展工作,储存一个<条码>的例子。 SortedDictionary<float,rot> in their UDT.

仅仅出于好奇,我想看一看一门通用类别是如何作为一栏数据类型、变数等在T-SQL环境下即时使用的。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签