Home
Options

[Bug] Support for SQL Variant, please help!

edited October 2015
Ever since Linqpad got updated (around about when Linqpad 5 came out) i have been unable to query my databases. It seems that wherever a "Sql Variant" is used anywhere, i get this error:

NotSupportedException: Invalid type mapping for Identity member '[a table that has a variant].[the column of type SqlVariant]'. Type 'System.Object' is not supported for identity members.

This is thrown even when i query a table that does not have a sql variant. It looks like LINQpad is trying to build a mapping and is failing.

Could this be resolved please? The previous version worked fine but now LINQPad is completely non-operational for me as nearly all of our production databases use a SQL Variant somewhere. Bit sad about this as i purchased LINQPad prior to this update and loved it, but am now pretty crippled without it.

Comments

  • Options
    I Apologise. I may have exaggerated how many tables this effected. The problem was we had a composite primary key across all of the columns in this table. This is a legitimate use of a composite key and this is supported by MSSQL so LINQpad should support it too. The workaround is to change it from a Composite primary key to a unique index including all the columns. This gets LINQpad operational again. Win for me, but i successfully got a grumbled permission from my boss to alter our production database to suit my 3rd party app.

    You owe me one LINQPad :)
Sign In or Register to comment.