Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I want to create an external content type based on SQL Server tables. My external content is a list of Cats and its source is a database table also named Cats.

However, I have a different Cats table in different database catalogues (the name of the table might also vary slightly) and I would like to be able, at runtime (if possible), to change the catalog and table name, the external entity is associated to. Is this possible?

I'm using Sharepoint 2010.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

If you do not need to update data, why don't you opt for creating a View as the source of your data, then via SharePoint Designer 2010 you could effectively build your entity based on view.

As an alternative, more complex though is to create you entities based on Stored Procedures, have a look here http://blogs.msdn.com/b/jysaikia/archive/2010/12/15/a-step-by-step-guide-in-designing-bcs-entities-by-using-a-sql-stored-procedure.aspx or here http://karthickmicrosoft.blogspot.ch/2011/04/using-external-content-types-with.html

In either case you would need to simply update your views and stored procedures, major constraint here would be to keep the structure the same - that is same columns, same data types and it should be fine.

share|improve this answer
    
Stored Procedure seems to be the way. –  John Assymptoth Sep 23 '12 at 17:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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