This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Guys, any idea what this exception means and how to fix the problem? TIA:
|
|
|
It looks like your entity has a field which is of a custom type, and SQL Server thinks that type is a SQL Server 2008 UDT, but we don't and therefore aren't passing the necessary hint into SQL Server. One way this could happen is if you are using the SqlServer2005 provider along with SQL Server 2008 types such as SqlGeography. To use SqlGeography etc., you must specify the SqlServer2008 provider in your LightSpeedContext. (In the designer, the 2005 provider works with both versions, but the runtime does make the distinction.) If that's not it, could you post the definition of the entity type you are inserting? (Just the fields will do, we don't need to see all the wrapper properties.) Thanks! |
|
|
Thanks Ivan, that was it. I was programmtically creating the LightSpeedContext without setting the DataProvider explicitly to SqlServer2008. I think it defaults to SqlServer2005 and since my table has SqlGeography, it threw the exception. That was good postulation. |
|