SharePoint 2010 and PostgreSQL through BCS

 BCS Meta Man, SharePoint 2010.

In this walkthrough we will demonstrate how to integrate PostgreSQL database with Microsoft SharePoint 2010 through ODBC and display PostgreSQL data on SharePoint 2010 page. In order to do that we will describe how to create a new external content type by means of BCS Meta Man.

  1. Prerequisites:
  2. Open Visual Studio 2010
  3. Add a New Project
  4. Expand the “SharePoint” node, select “Lightning Tools (2010)” node and then the “BCS Meta Man” project type
  5. Give your project a name i.e PostgreSQLBCSMetaManDemo and click “OK”

    5 thumb SharePoint 2010 and PostgreSQL through BCS

  6. On the next dialog box, enter the name of where you want to deploy your model, and click “Finish” button

    6 thumb SharePoint 2010 and PostgreSQL through BCS

  7. If prompted, click “Trial” on the licensing dialog
  8. To show the “BCS Meta Man Data Source Explorer” we need to enable it from the Menu item, this new window can be docked so it doesn’t get in your way

    8 thumb SharePoint 2010 and PostgreSQL through BCS

  9. Click the “Add Connection” button to show the “Connection Dialog”
  10. Select “ODBC Server” as Data Source type, enter PostgreSQL ODBC connection string (for example it can be “Driver={PostgreSQL ANSI};server=cygnus;port=5432;database=postgres; Uid=postgres;Pwd=12345;Trusted_Connection=yes;”), enter double quotes as left and right delimiters and “?” as parameter symbol and click “Connect” button

    10 thumb SharePoint 2010 and PostgreSQL through BCS

  11. The Data Source Explorer will now be populated with your PostgreSQL data

    11 thumb SharePoint 2010 and PostgreSQL through BCS

  12. We will be working with the public.“customer” table, to add it to the Model, just drag it from the “Data Source Explorer” onto the “Diagram”
  13. When you drop the table you will be shown the following dialog, we should choose “Database” , click “OK”

    13 thumb SharePoint 2010 and PostgreSQL through BCS

  14. Accept the default entity name by clicking “Next”

    14 thumb SharePoint 2010 and PostgreSQL through BCS

  15. Accept the
    default “Identifiers” by clicking “Next”

    15 thumb SharePoint 2010 and PostgreSQL through BCS

  16. Accept the default 3 methods to be created, click “Generate” (The default 3 methods are: “Finder” – Returns all items, “Specific Finder” – Returns a single item by identifier, “IdEnumerator” – Returns just the Identifiers for all of the items)

    16 thumb SharePoint 2010 and PostgreSQL through BCS

  17. Press F5 to deploy, this will load up your SharePoint Page once deployed
  18. Add a new External list by selection on SharePoint page “Site Action”->“More Options”->“External List”

    18 thumb SharePoint 2010 and PostgreSQL through BCS

  19. Click on the icon to show the available External Content Types

    19 thumb SharePoint 2010 and PostgreSQL through BCS

  20. Select our PostgreSQLBCSMetaManDemo.public_customer External Content Type, click “OK”

    20 thumb SharePoint 2010 and PostgreSQL through BCS

  21. Click “Create”
  22. Your External System data from PostgreSQL database is now displayed in the SharePoint External List

    22 thumb SharePoint 2010 and PostgreSQL through BCS

We hope this walkthrough will be useful for you. If you have any questions feel free to email them to support@lightningtools.com

Leave a Comment

Your email address will not be published. Required fields are marked *

*

* Copy This Password *

* Type Or Paste Password Here *

*