basquang™ on clouds

March 19, 2012

SharePoint 2010 BDC using EF4: Troubleshooting

Filed under: Entity Framework (EF),SharePoint — basquang @ 10:11 AM

This article listing common errors when develop CRUD Business Connectivity Services solution in SharePoint 2010 using ADO.NET Entity Data Model (EF4).

Error 1: ConnectionStrings

“The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.’”.
“ADO.Net Entity Framework Connection String: “Keyword not supported: ‘Data Source'”
Entity (External Content Type) cannot be found with Namespace=***”

Solution 1: Copy ConnectionStrings

Copy the connection strings generated from ADO.NET Entity Data Model (app.config) to SharePoint Web Application Configuration file (web.config)

Error 2: Entity Framework

[ConstraintException: This property cannot be set to a null value.]
   System.Data.Objects.DataClasses.StructuralObject.SetValidValue(String value, Boolean isNullable)

Solution 2:

Modify the SetValidValue method in the generated designer code from SetValidValue(value, false) to SetValidValue(value, true)

Error 3: Update field

The Field named *** contains an Identifier which is not read only. The Update operation requires a corresponding PreUpdaterField for this Field on Method with Name ‘Update’ on Entity

Solution 3:

Set the  Pre-Updater Field property of the Identifier TypeDescriptor in the method to True

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at

%d bloggers like this: