Modifying a column with the 'Identity' pattern is not supported in WCF RIA Services

Posted by Banford on Stack Overflow See other posts from Stack Overflow or by Banford
Published on 2010-05-06T17:07:20Z Indexed on 2010/05/07 9:38 UTC
Read the original article Hit count: 599

I've been following the walkthrough for creating your first WCF RIA Services Application from Microsoft and have encountered a problem when trying to edit and update data using the SubmitChanges() method of the Data Context.

The table being updated has an Identity Specification set in SQL Server 2008 on the 'CourseID' column. However the PRIMARY key is a composite of two other fields.

When using SubmitChanges() the application locks up in the browser an presents an unhandled exception. By handling this exception I managed to get the message: Modifying a column with the 'Identity' pattern is not supported. This is referring to the 'CourseID' column.

Turning identity specification off solves the problem, but I need the auto-incrementing ID. In what way isn't this supported. Or where am I going wrong?

© Stack Overflow or respective owner

Related posts about sql-server-2008

Related posts about wcf-ria-services