System.InvalidCastException: Object must implement IConverti

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
jlentrichia
Posts: 12
Joined: Wed 11 May 2011 15:12

System.InvalidCastException: Object must implement IConverti

Post by jlentrichia » Thu 23 Jun 2011 12:24

System.InvalidCastException: Object must implement IConvertible

I have a table with a VersionNumber column, not sure if this is related. But there are about 50 columns in this table, not sure which is throwing the error. I removed the VersionNumber column, but for some reason the generated SQL is still pulling this from the database. Any idea what's going on?

-Joe

SQL log here:


SELECT VersionNumber FROM dbo.ContactBase WHERE ContactId = @key1
-- key1: Input UniqueIdentifier (Size = 0; DbType = Guid) [71618408-7613-de11-bc5e-005056a0787b]
-- Context: Devart.Data.SqlServer.Linq.Provider.SqlDataProvider Model: ap Build: 2.50.24.0

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Fri 24 Jun 2011 13:21

Could you please describe this table and the corresponding entity class in more details? For example, please specify the data types used for the table columns, and whether some of entity fields are joined into complex types. If possible, please specify the script needed to create this table, or send us the model with which you encounter this problem.

jlentrichia
Posts: 12
Joined: Wed 11 May 2011 15:12

Post by jlentrichia » Fri 24 Jun 2011 13:41

i will email you the schema. it's not many tables but the tables have many columns. no complex types. at least none that i created, i'm assuming these aren't derived from the DB.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Mon 27 Jun 2011 08:18

We've answered you by mail.

Post Reply