Following this article I am trying to connect to a local SQL database using SharePoint Designer. I am able to create external content type, use it in external list, and the list is correctly populated with data from the database: enter image description here

However, when I try to connect to database using connection string, it returns an error: enter image description here

The connection strings I tried (from various sources and articles):

  • Data Source=win\SharePoint;Initial Catalog=Testing1;User Id=Administrator;Password=AuthenticPassword;
  • Data Source='(local)';Initial Catalog=Testing1;User Id=Administrator;Password=AuthenticPassword;
  • Data Source='(local)';Initial Catalog=Testing1;User Id=user1PresentInSecurityLoginsinSQLdatabase;Password=AuthenticPassword;
  • Server=win\SharePoint;Database=Testing1;User Id=user1; Password=AuthenticPassword;
  • Server='(local)';Database=Testing1;User Id=user1; Password=AuthenticPassword;

The error is still the same. Since the external CT can be created without issues, the database is not an issue. What am I doing wrong with the connection string?

1 Answer 1


Try filling the information in Connect to a Data Server dialog instead of Use Custom Connection string as you might face an error while giving the details of the connection string. Let it create the connection string by its own by the parameters you pass in dialog fields. As i can see that all the connection strings are correct but If you still get an error than you can follow steps mentioned in below given link.

Step by Step Part 2: Creating the External Content Type

Some Workaround for your Error

There are several solutions out there in the web for this error like the ones listed below but none of them are sure shot fixes

How to fix: Recieve error "Unable to display this Web Part" on Data Views after restoring site from backup

After having tried out several solutions with no luck we tried copy the datasource from a newly created dataview and replace the datasource in the erroneous dataview. Gotcha this worked. Below are the steps we did

  1. Create a new page in SharePoint designer.
  2. Add a dataview webpart to the new page and set the datasource as the same list or library that the erroneous dataview uses.
  3. Switch to the code view.
  4. Open the page with the erroneous dataview in code view mode.
  5. Copy the datasource element from the dataview in new page
  6. Replace the datasource element of the erroneous dataview with the copied datasource element
  • the article explains how to create the external content type. In my case it works perfectly (and the external data source IS discovered without issues). Only when I go to Data Sources (on the left)>Database Connection>Configure Database Connection, I receive the errors. It does not matter whether I fill the data in the fields or whether I enter them as a connection string.
    – grisha
    Jun 7, 2016 at 13:01
  • Is there any specific requirement to connect it again after creating External content type?
    – Hardik
    Jun 7, 2016 at 13:05
  • 1
    You can use Secure Store service to get it connected as many times you need. as it saves the connection in it.
    – Hardik
    Jun 7, 2016 at 13:07
  • Kindly Check here...support.office.com/en-us/article/…
    – Hardik
    Jun 7, 2016 at 13:08
  • Please check updated answer.
    – Hardik
    Jun 7, 2016 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.