Question

I get the following error when trying to load a large db into linqpad. I can connect to smaller dbs on the same server, but not this larger one. This DB is a Dynamics GP database. Not the actual DYNAMICS one, but the default 'TWO' one.

System.TypeLoadException

Type "LINQPad.User.TypedDataContext' from assembly 'TypedDataContext_iuhmuv. Version=0.0.0.0, Culture=neutral PublicKeyToken=null'

contrain more methods than the current implementation allows.

Was it helpful?

Solution

The CLR imposes a hard limit of ushort.MaxValue - 15 methods per class. It's unlikely that any database would have more tables than this, but I have encountered databases with a ridiculous number of stored procedures. It is possible that your database has more than 65K stored procedures / functions?

If so, you can tell LINQPad not to create methods for them by editing the connection (right-click, Properties) and untick the 'Include Stored Procedures and Functions' checkbox.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top