SharePoint 2007: BDC - The Hello World Example

Posted on 4/24/2007 @ 5:20 AM in #SharePoint by | Feedback | 68519 views


SharePoint 2007: BDC - The Business Data Catalog

This post is in continuation to a series of blogposts I put up on BDC - the Business Data Catalog.

Table of Contents:

  • Introduction
  • In-built Webparts
  • Lists with Business data type columns
  • Search
  • User Profiles
  • Other custom applications targeting a common runtime object model.
  • Making it easier to author XML Applications: BDCMetaMan

  • So, as I just described, BDC is a way to bring external data into MOSS. Anything that can be accessed using ADO.NET or a Web Service, can be brought into MOSS using BDC.

    Here is a good 30,000 foot view of BDC -

    Some of you may ask "Well that ain't such a huge big deal", because you could also write a custom webpart to do exactly that, as you will see in the following blogposts - you are tad bit missing the point. Missing the point because, BDC is a no code solution. Even though, the honkin' XML goo you need to work with to make BDC work may leave you longing to write code instead, but a no code solution means, tools could be built to author and maintain this metadata, and programmers could be freed from this responsibility. Also, BDC works very very well with everything else in SharePoint (as I will demonstrate in the upcoming blogposts), so it is indeed much more sophisticated than writing your own webparts. I guess you could implement all of what BDC gives you by hand, but you could also row all the way to japan in a small boat - doesn't mean you should ! :-)

    So to get BDC working, (i.e. bring external data into MOSS), you first need to author a BDC application. I'm going to call "BDC Application" as Big Honkin' XML Goo! (BHXG), or just XML Goo! in short, because I think it is a much more appropriate name. The Xml Goo needs to contain all the information necessary about the BDC application, and then it needs to be imported into the appropriate shared service provider.

    This XML Goo is imported into the shared service provider that then takes the responsibility of reading all this metadata about the LOB (line of business) data, and making it available to various sharepoint sites, other sharepoint features, and other custom applications over a common runtime object model.

    As I just said, the Xml Goo needs to contain all the information necessary about the BDC application, and then it needs to be imported into the appropriate shared service provider. Common sense would tell us that this information would need to contain atleast the following -

    - Where is my LOB data

    - How can I access it (i.e. what security model and credentials to use)

    - What am I extracting (the definition of the entities)

    - What are the parameters I wish to allow in extraction of these entities

    - What custom actions can I perform on those entities

    - If I have a number of entities, what are the various associations between those entities.

    So let me write a quick "Hello World" BDC application that requires atleast the first 4 of the above points.

    Now considering that all of you are familiar with "Northwind" (yeah yeah I know I'm boring, but atleast consistently boring), Northwind has a "Customers" table. If I wished to extract "Customer" using a SQL Query that looks like this -

    SELECT CustomerID, ContactName, Address, City FROM Customers WHERE CustomerID = @CustomerID

    I could specify a BDC application that would let me do exactly the above. The application would look a tad bit like this (get ready for the Huge Honkin' Xml Goo) -

    <?xml version="1.0" encoding="utf-8" standalone="yes" ?>

    <LobSystem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog BDCMetadata.xsd" Type="Database" Version="1.0.0.0" Name="NorthWindApp" xmlns="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog">

      <Properties>

        <Property Name="WildcardCharacter" Type="System.String">%</Property>

      </Properties>

      <LobSystemInstances>

        <LobSystemInstance Name="NorthWindTraders">

          <Properties>

            <!--AuthenticationMode can be set to PassThrough, RevertToSelf, RdbCredentials, or WindowsCredentials. -->

            <Property Name="AuthenticationMode" Type="System.String">PassThrough</Property>

            <Property Name="DatabaseAccessProvider" Type="System.String">SqlServer</Property>

            <Property Name="RdbConnection Data Source" Type="System.String">192.168.0.107\SQLSERVER</Property>

            <Property Name="RdbConnection Initial Catalog" Type="System.String">Northwind</Property>

            <Property Name="RdbConnection Integrated Security" Type="System.String">SSPI</Property>

            <Property Name="RdbConnection Pooling" Type="System.String">false</Property>

          </Properties>

        </LobSystemInstance>

      </LobSystemInstances>

      <Entities>

        <Entity EstimatedInstanceCount="100" Name="Customer">

          <!-- EstimatedInstanceCount is an optional attribute-->

          <Properties>

            <Property Name="ContactName" Type="System.String">ContactName</Property>

          </Properties>

          <Identifiers>

            <Identifier Name="CustomerID" TypeName="System.String" />

          </Identifiers>

          <Methods>

            <!-- Defines a method that brings back Customer data from the back-end database.-->

            <Method Name="GetCustomers">

              <Properties>

                <Property Name="RdbCommandText" Type="System.String">

                  SELECT CustomerID, ContactName, Address, City FROM Customers WHERE CustomerID = @CustomerID

                </Property>

                <Property Name="RdbCommandType" Type="System.Data.CommandType">Text</Property>

                <!-- For database systems, can be Text, StoredProcedure, or TableDirect. -->

              </Properties>

              <FilterDescriptors>

                <!-- Define the filters supported by the back-end method (or sql query) here. -->

                <FilterDescriptor Type="Comparison" Name="CustomerID" >

                  <Properties>

                    <Property Name="Comparator" Type="System.String">Equals</Property>

                  </Properties>

                </FilterDescriptor>

              </FilterDescriptors>

              <Parameters>

                <Parameter Direction="In" Name="@CustomerID">

                  <TypeDescriptor TypeName="System.String" IdentifierName="CustomerID" AssociatedFilter="CustomerID" Name="CustomerID">

                    <DefaultValues>

                      <DefaultValue MethodInstanceName="CustomerFinderInstance" Type="System.String">ALFKI</DefaultValue>

                    </DefaultValues>

                  </TypeDescriptor>

                </Parameter>

                <Parameter Direction="Return" Name="Customers">

                  <TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="CustomerDataReader">

                    <TypeDescriptors>

                      <TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="CustomerDataRecord">

                        <TypeDescriptors>

                          <TypeDescriptor TypeName="System.String" IdentifierName="CustomerID" Name="CustomerID">

                            <LocalizedDisplayNames>

                              <LocalizedDisplayName LCID="1033">CustomerID</LocalizedDisplayName>

                            </LocalizedDisplayNames>

                          </TypeDescriptor>

                          <TypeDescriptor TypeName="System.String" Name="ContactName" >

                            <!-- Do not use the AssociatedFilter  attribute in return parameters.-->

                            <LocalizedDisplayNames>

                              <LocalizedDisplayName LCID="1033">ContactName</LocalizedDisplayName>

                            </LocalizedDisplayNames>

                            <Properties>

                              <Property Name="DisplayByDefault" Type="System.Boolean">true</Property>

                            </Properties>

                          </TypeDescriptor>

                          <TypeDescriptor TypeName="System.String" Name="Address">

                            <LocalizedDisplayNames>

                              <LocalizedDisplayName LCID="1033">Address</LocalizedDisplayName>

                            </LocalizedDisplayNames>

                            <Properties>

                              <Property Name="DisplayByDefault" Type="System.Boolean">true</Property>

                            </Properties>

                          </TypeDescriptor>

                          <TypeDescriptor TypeName="System.String" Name="City">

                            <LocalizedDisplayNames>

                              <LocalizedDisplayName LCID="1033">City</LocalizedDisplayName>

                            </LocalizedDisplayNames>

                          </TypeDescriptor>

                        </TypeDescriptors>

                      </TypeDescriptor>

                    </TypeDescriptors>

                  </TypeDescriptor>

                </Parameter>

              </Parameters>

              <MethodInstances>

                <MethodInstance Name="CustomerFinderInstance" Type="Finder" ReturnParameterName="Customers" />

              </MethodInstances>

            </Method>

          </Methods>

          <!-- Enter your Action XML here -->

        </Entity>

      </Entities>

    </LobSystem>

    Now, don't tell me that I didnt' warn ya! It is huge eh? Now here's the sucky part - No IDE support to author the above, yeah you do have a schema, but if you work with BDC, you will soon find out why a schema just ain't enough. Some valiant efforts are underway to create tools that will allow a more friendly way of authoring a BDC application, I certainly hope MSFT addresses this in Orcas (but I am not counting on it either), but once you get beyond the above hugeness of XML, it ain't so bad.

    If you sniff through the above XML, you will see various logical peices emerge. At the top, I have -

      <LobSystemInstances>

        <LobSystemInstance Name="NorthWindTraders">

          <Properties>

            <!--AuthenticationMode can be set to PassThrough, RevertToSelf, RdbCredentials, or WindowsCredentials. -->

            <Property Name="AuthenticationMode" Type="System.String">PassThrough</Property>

            <Property Name="DatabaseAccessProvider" Type="System.String">SqlServer</Property>

            <Property Name="RdbConnection Data Source" Type="System.String">192.168.0.107\SQLSERVER</Property>

            <Property Name="RdbConnection Initial Catalog" Type="System.String">Northwind</Property>

            <Property Name="RdbConnection Integrated Security" Type="System.String">SSPI</Property>

            <Property Name="RdbConnection Pooling" Type="System.String">false</Property>

          </Properties>

        </LobSystemInstance>

      </LobSystemInstances>

     

    Nice huh? As you can see, I am using "PassThrough" authentication. PassThrough means, the dude (or dudette) loggedin to the sharepoint site using windows credentials, their credentials matter when connecting to the backend LOB data source. So this will work if,

    a) You are using Kerberos, or
    b) You are using NTLM and everything including the user is on a single machine (good for demos only).

    Another thing you have to be careful of using "PassThrough" is, when "Search" tries to index BDC data, the "Search" user's credentials will be tried on the database. Yuck!. But the simplicity of this approach makes it very very appealing. Other options are RevertToSelf (where the Application pool identity takes over), WindowsCredentials (Office SSO), RdbCredentials (SSO + DbCredentials), or web service credentials sent as digest (challenge/response) or basic (clear text).

    Next, in the above XML, I have defined an Entity called "Customer", Customer has an identifier called "CustomerID" (a.k.a. primary key in BDC land), and it has a method called "GetCustomers".

    GetCustomers uses the simple SQL Statement I specified earlier

    SELECT CustomerID, ContactName, Address, City FROM Customers WHERE CustomerID = @CustomerID

    And, it contains the definition of the input parameter (CustomerID) alongwith a default value, and a return type of DataReader with the necessary representation for all columns.

    Finally, I have a "MethodInstance" of type "Finder" with a return parameter of type "Customer". Interesting huh? The MethodInstance type affects how this method will be used, for instance "Finder" is the equivalent of pulling out a list, SpecificFinder is pulling out a singleton entity, IDbEnumerator is for search, and scalar is for a singleton value, and so on and so forth.

    Great!

    Now with the Honkin' Huge Xml Goo written, go ahead and import that into the Shared Service Provider using the following steps -

    • Go to the SSP
    • Click on Business data catalog//import application definition
    • Browse to the Xml Goo as your "Application Definition File", choose to import as a "Model", and hit "Import"

    If you have setup everything properly (including security), on both the database and the sharepoint server & network, you should see the following warning -

    No method instance of type SpecificFinder defined for for application 'NorthWindApp', entity 'Customer'. Profile page creation skipped.

    Ya'know -- just ignore that warning for now :-). What the above is telling you is that, "You fool, you forgot to include the "Specific Finder" kinda method instance, so you can't really view a single entity. Sure you can pull in a list - but what good does that do?"

    Uhhm .. since this is just a Hello World example, just ignore it for now. We'll fix it later.

    So guess what, assuming your security is setup properly, your BDC app is ready to eat. You can use it in the following manner.

    • Go to your favorite sharepoint site.
    • Edit a page that accepts webparts.
    • Add a webpart called "Business Data List". If you created this site using the Blank Template, you will need to first go and enable this webpart in the webpart gallery (Site Actions --> Site Settings --> WebPart gallery).
    • When you add the WebPart, it'd look like this -
    • Do exactly that, Click on "Open the Tool Pane" (or you can also "Modify Shared Web Part" under the Edit menu).
    • In the tool pane, put in "Customer (NorthWindTraders)" under the "Type" text field. It's better if you use the finder button, so there are no typos. Mine looks like this -
    • Hit "OK" at the bottom of the page, and your webpart should look like this now -
    • Click "Exit Edit Mode", and type in a Customer ID of "ALFKI" (or whatever else you please), hit "Retreive Data" and assuming you actually followed all I wrote in this post above properly, you should see results in your BDC webpart as shown below -

    AWESOME! :-)

    But, what good is a "List" with "One" item? :-/.

    So let us next extend this example, so it fetches me a number of results back.

    Sound off but keep it civil:

    Older comments..


    On 5/10/2007 5:28:09 PM Sumit Adlakha said ..
    Hi Sahil,

    Thanks for the informative tutorial on BDC.


    I intend to change the Application Definition File for the purpose of logging on to the database with a UserId and Pwd. Can you please suggest the changes that I should do in LobSystemInstance section.

    appreciate your help!


    On 8/17/2007 3:35:36 PM krs said ..
    I have found this post very helpful in getting started with the BDC. Thank you.


    On 9/30/2007 9:16:57 AM Scott said ..
    *** News ***


    There is now an Editor to create the xml definition for you:


    Microsoft has released the:


    Business Data Catalog Definition Editor


    as part of the Sharepoint 2007 SDK (August 2007)

    I am still having a problem creating a BDC to an Oracle back end.


    I have uploaded the SSP and can add a column in a list usig the Business Data, select the columns from the database BUT when I hit the browse button, nothing is returned (check names also doesn't work).

    Great site!


    On 9/30/2007 7:41:45 PM Sahil Malik said ..
    Scott -

    You're right. Y'know I need to through all my blogposts and update them per the latest stuff.

    SM


    On 11/6/2007 2:10:01 PM Michael said ..
    What a great intro to BDC. Very straightforward and informative. I've read about 10 of these and none were on a par with this. Thanks for putting this out here.


    On 11/6/2007 5:07:23 PM Sahil Malik said ..
    LOL - Thx. Michael. Yeah I have a tendency to take MSDN, and decomplexify/half-digest/spit it in a glass for others to drink.

    Seriously speaking - I have no idea why so many others on the web tend to make things so un-understandable.


    On 11/19/2007 12:35:22 PM Michael J said ..
    Thanks for the info on setting up BDC with Northwind.

    I found that I had quite a bit of trouble getting my connections to work on my SQLEXPRESS instance on my local Win2k3 server so I wanted to post what I found out here in case others ran into a similar issue.

    The original error message I had from within in SharePoint was a somewhat generic "can't connect to NorthwindTraders". Looking in the LOG file I saw a Critical message indicating that SQL Server wasn't accepting remote connections. The message said something like "under the default settings SQL Server does not allow remote connections". I GOOGLED this string and found a few posts that said this was common with SQLEXPRESS and listed steps to correct the issue. I followed the steps laid out in one of the postings and made some progress. I went to a command prompt to troubleshoot the connection issues using OSQL. At first I was getting and error message "No connection could be made because the target machine actively refused it " and when GOOGLE-ING this error I was pointed to the following post (http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277). Following these instructions cleared up my issue.

    NOTE my OSQL text looked like this: osql -E -S tcp:mymachine\SQLEXPRESS

    In the XML file my connection information looks like this:

    <LobSystemInstances>


    <!-- An LobSystem can have only one LobSystemInstance. The LobSystemInstance defines the connection and authentication parameters. -->


    <LobSystemInstance Name="NorthwindSample">


    <Properties>


    <Property Name="AuthenticationMode" Type="System.String">PassThrough</Property>


    <!--AuthenticationMode can be set to PassThrough, RevertToSelf, RdbCredentials, or WindowsCredentials. -->

    <Property Name="DatabaseAccessProvider" Type="System.String">SqlServer</Property>


    <!-- Can be SQL Server, OlEDB, Oracle, or ODBC for database systems. -->

    <Property Name="RdbConnection Data Source" Type="System.String">TCP:mymachine\SQLEXPRESS</Property>


    <!-- The name of your server hosting the database or the name of the SQL Server instance in the format SQLServer\Instance. -->

    <Property Name="RdbConnection Initial Catalog" Type="System.String">Northwind</Property>


    <!-- The name of the database.> -->

    <Property Name="RdbConnection Integrated Security" Type="System.String">SSPI</Property>


    <Property Name="RdbConnection Pooling" Type="System.String">false</Property>


    </Properties>


    </LobSystemInstance>


    </LobSystemInstances>


    On 11/19/2007 1:19:55 PM Sahil Malik said ..
    Thanks for contributing Michael. One candle lighting another is only more light. You have no idea how many people email me privately for questions (literally like I work for them). If they only left it as a comment on my blogpost, or heck even better, posted the solution when they found one, the world would be a better place.

    Once again, thanks!


    On 11/23/2007 6:24:54 AM Pedro Pereira said ..
    hi Sahil,


    i have a problem here with the webparts for bdc that comes with moss, i am trying to custumize them using xsl but with no luck. do you know or can point me to the right direction?


    the objective is to have xsl on the bussiness data list made custom.


    On 12/5/2007 6:49:24 AM Aman said ..
    Hi Sahil,
    thanks a lot for ur help on BDC along withthe screen shots.
    Actually i m havig a slight problem with it.
    i m not being able to VIEW the DATA TYPES in the WEb part???
    after i click on the EDIT TOOL PANE in the web part.
    Any clues why is this so .
    i have genrated the XML n the methods are executing properly.

    Anyone May reply.

    On 12/5/2007 3:07:30 PM Vladimir Kelman said ..
    Hi Sahil,

    Visual Studio 2008 is released. Do you know if they included some support for dealing with BDC XML files in it?

    On 12/12/2007 12:15:49 PM Luc Alix said ..
    Hi,
    This is a very good demonstration on how to integrate BDC. It helped understanding the "how-to".
    I still have a problem though. The integration itself went fine. When integrating the webpart on a page and i type in the data list, then i get the message "No exact match was found". When browsing from that control i effectively get no registered BDC back. Do you have any idea on solving this ?

    Thanks in advance,
    Luc

    On 12/17/2007 11:37:57 AM Nic Oughton said ..
    Thanks for the very informative article. I have found it very useful from a conceptual point of view - however I am having a problem actually getting any data on to the screen.

    I have followed your example to the letter but when I go to configure my Business Data List webpart I don't get any data.

    Is there something that needs to be switched on to make the BDC work. I noticed that if I tried to use a BDC item as a list column that it gave me a message that BDC wasn't activated for the site - so I did that but it still didn't make any difference to overall access to the data.

    Any help gratefully received.

    Thanks!

    Nic

    On 12/17/2007 6:00:36 PM Nic Oughton said ..
    Ok - here's what I found.

    I noticed that nothing was being saved by the Business Data List webpart e.g. if I changed the title that didn't save either.
    So I added a BDL to another site and bingo(!) it works (well actually it didn't-but that must be down to me messingabout with the file trying to make it work!)

    So I don't actually know what the setting is yet - but if you have a similar problem tring creating another site an adding a BDL to it.

    Ah now I can enjoy the rest of the series!

    Nic

    On 12/18/2007 2:46:09 PM Jim Leonard said ..
    Thanks for a great tutorial. As a senior technical manager looking to implement new capabilitites your articles cut right to the chase and provide lots of good ideas. -- Jim


    On 12/18/2007 3:46:51 PM Sahil Malik said ..
    Thx Jim. Plus they are unlike MSFT whitepapers huh?


    On 1/23/2008 5:16:16 PM Rob said ..
    I need to implement a single sign on from an asp.net web form to an External sp site.

    The External site has been extended from an Internal site.

    We are using sqlmembership provider. And have everything configured in the various web configs.

    We are following a pattern that works between two asp.net application on separate sub domains. To allow single sign on there.

    We are creating a cookie with domain level permissions so that a site on www.hh.com, (our asp.net login) allows permissions to portal.hh.com (Our extended sharepoint portal).

    In the sp global.asax during the Application_AuthenticateRequest event we are setting the context of the user to a generic principle on behalf of the asp.net login page.

    But this does not appear to be working. We have spent 2 men for two days working on this and cannot figure it out. Any advice you have would be appreciated. I can send code examples if you would like, here is a link to a diagram of what we are trying to do...


    http://www.afs.net/sp.jpg


    On 2/6/2008 5:18:27 PM Anthony said ..
    Hi Sahil,

    I am able to generate the xml file with the Microsoft BDC tool (from the SDK) and also using BDC MetaMan. I am able to


    import the application definitions succesfully and I can see the entities. However, when I try adding the web part and


    attempt to edit/add the Business Data List Type, it does not show up as a selection in the browse box. (There are no selections to choose from at all). Any ideas?

    Appreciate any assistance you can provide.

    Regards,


    -Anthony


    On 2/6/2008 6:56:48 PM Anthony said ..
    Looks like this is a permissions issue. When I am logged in as the system account, it works. But when I try to view the bdc updates with my regular user id, it says I do not have permission to access the database.

    Hi Sahil,

    I am able to generate the xml file with the Microsoft BDC tool (from the SDK) and also using BDC MetaMan. I am able to


    import the application definitions succesfully and I can see the entities. However, when I try adding the web part and


    attempt to edit/add the Business Data List Type, it does not show up as a selection in the browse box. (There are no selections to choose from at all). Any ideas?

    Appreciate any assistance you can provide.

    Regards,


    -Anthony


    On 2/15/2008 4:58:45 PM Ed. said ..
    Great, but have you figured out how to get data from the BDC to display for anonymous/non-authenticated users of your site?


    On 3/20/2008 7:34:42 AM Asjad Lakhani said ..
    Hi Sahil, Thats really gr8 article for novice user of BDC just like me...

    But plz tell me what shall i do if i want to use Credentials in SQL Server, instead of Windows Authentication.

    Thanks in advance


    On 4/27/2008 9:25:08 AM Fuad Taha said ..
    Hi Sahil,


    Im one of UR fans ^^


    just passed to say thank you for this great effort,,

    Best Regards


    Fuad Taha


    On 4/29/2008 4:09:01 PM sema atavi said ..
    I set up the BDC in Shared Services site, shouldn't be available to use on another sites on the same server?


    thanks


    On 5/15/2008 6:25:35 AM Tom.VanGaever said ..
    Fantastic Site,

    this helped us very much while researching the BDC

    Thanks alot!


    On 7/8/2008 6:45:05 PM Ven said ..
    I have a stored Procedure which returns 2 tables. Please let me know the entire ADF file to implement this at the earliest.


    On 8/15/2008 11:03:58 AM AlexanderN said ..
    Oh wow M$ this is great!!

    NOT!!!


    On 9/2/2008 3:31:54 AM arka said ..
    Hi, I'm getting this error

    Unable to connect to AdventureWorksDWInstance

    and I checked the log and here's the error that I got:

    SharePoint Portal Server Business Data 0 Critical Could not open connection using 'data source=OFFICESERVERS;initial catalog=AdventureWorksDW;integrated security=SSPI;persist security info=false' in App Domain '/LM/W3SVC/1517370704/Root-1-128648481714375000'. The full exception text is: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

    and this is the application definition file that I copy from MSDN AdventureWorksDW SQL Server 2005 Sample


    (http://msdn.microsoft.com/en-us/library/ms494876.aspx)

    I only changed the Data Source part:


    <LobSystemInstances>


    <LobSystemInstance Name="AdventureWorksDWInstance">


    <Properties>


    <Property Name="AuthenticationMode" Type="Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbAuthenticationMode">PassThrough</Property>


    <Property Name="DatabaseAccessProvider" Type="Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbAccessProvider">SqlServer</Property>


    <Property Name="RdbConnection Data Source" Type="System.String">AVALON-E3VB155L\OFFICESERVERS</Property>


    <Property Name="RdbConnection Initial Catalog" Type="System.String">AdventureWorksDW</Property>


    <Property Name="RdbConnection Integrated Security" Type="System.String">SSPI</Property>


    </Properties>


    </LobSystemInstance>


    </LobSystemInstances>

    I lauched SQL Server Management Studio Express, login in with Windows Authentication, I expand the Database and the AdventureWorks is there (i downloaded the sample database AdventureWorksDB.msi from http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx?ReleaseId=4004 and i installed it and i attached it to TWO Directories, one in E:\Program Files\Microsoft Office Servers\12.0\Data\MSSQL.1\MSSQL\Data AND the other in E:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data)

    I also set the Permission to Full Control under the login account Administrator for these two files AdventureWorks_Data.mdf and AdventureWorks_Log.ldf

    I also went to SharePoint Central Administration >> SharedServices >> View Application >> Selected AdventureWorksDW menu for Manage Permissions >> to have these rights Edit, Execute, Selectable in clients, Set Permissions

    ....and I'm still getting the error Unable to connect to AdventureWorksDWInstance

    I'm clueless, can you tell me what I'm doing wrong here?


    On 9/22/2008 10:03:19 PM Vivek said ..
    This series proved to be an excellent resource for learning BDC related stuff. Thanks for the post.


    Was wondering what tool do you use for creating those diagrams (like the one on this page)..look real cool :)


    On 9/29/2008 3:21:24 PM Brandt Smith said ..
    Has anyone tried to programatically insert a List Item that has a BDC column in it? I have been able to insert list items using InfoPath - but not ones with BDC columns...


    On 1/13/2009 3:56:33 AM yogesh pande said ..
    Please tell us how to modify the xml file to include RDBCredentials


    On 3/12/2009 7:47:29 AM yogesh Dhale said ..
    i don't have any Active directory and MOSS is installed on different machine than the machine on which SQl Server is installed.


    Can i use RdbCredentials for that?if yes then please tell how?


    On 3/23/2009 10:22:00 AM Devendra said ..
    Hi ,


    I am getting this error "Unable to connect to EregisterIntegrationInstance." when i specify the type in BussinessDatalist datawebpart


    On 4/8/2009 6:18:39 PM Harini said ..
    Is it mandatory to have Enterprise edition of Sharepoint to configure BDC?


    On 4/15/2009 6:04:18 AM VJ said ..
    try this "<Property Name="AuthenticationMode" Type="Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbAuthenticationMode">RevertToSelf</Property>"


    On 4/25/2009 10:42:59 AM jc said ..
    I guess it's not possible to simply create the XML file manually as I get an error on this line while loading it up. Where and How exactly does one create the Finder?

    <MethodInstance Name="CustomerFinderInstance" Type="Finder" ReturnParameterName="Customers" />


    On 5/7/2009 3:50:00 AM Ronald said ..
    Hey,

    Nice blog for the BDC option in sharepoint, but i had a question.


    Is there a creator for the xml file? I had problems to maken this file.

    Thanks!


    On 5/14/2009 10:35:56 AM Fabian said ..
    Look for BDC Meta Man, an excelente app for xml generation...

    Bye


    On 7/6/2009 11:46:15 AM Rahul S. Gupta said ..
    Hi,


    Good example.


    Wanted to know While using "RdbCredentials" things where not working. Just wanted to know the reson behind this. The exception shown in log file is

    A Metadata Exception was constructed in App Domain '/LM/W3SVC/1997031198/Root-1-128913409977828664'. The full exception text is: The Property with name 'SsoApplicationId' is missing on the LobSystemInstance.


    On 8/21/2009 12:30:23 PM ben said ..
    I am using MOSS 2007 and SQL Server 2008. I installed the sample database AdventureWorksDW. I generated the xml file with the MS BDC tool then I tried to import the XML file into Sharepoint BDC and I getting the following error message:

    Application definition import failed. The following error occurred: Entity could not be found using criteria 'name LIKE [AdventureWorksDW].[dbo].[DimProductCategory]'. Error was


    encountered at or just before Line: '210' and Position: '16'.

    Here is what in line 209 and 210


    <Parameter Direction="In" Name="@ProductCategoryKey">


    <TypeDescriptor TypeName="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IdentifierEntityName="[AdventureWorksDW].[dbo].[DimProductCategory]" IdentifierName="ProductCategoryKey" Name="ProductCategoryKey" />

    I would appreciate any help with this issue.


    Thanks.

    </Parameter>


    On 9/2/2009 10:13:01 AM Gordon said ..
    Very useful article.

    I have created a BDC for CRM based on the Enterprise Search Accelerator and your article helped me to adapt it.

    My question is, what is the difference between the mechanism which supplies the "Check Names" button and the "Browse\Search" Buttons. For me, the latter works but the former does not.

    Very confused.


    On 10/5/2009 10:09:02 AM Jonathan Roussel said ..
    Congrats for these very nice articles.

    Clear and bundled with all the examples needed, If someone asks me for a BDC walkthrough I know what I'll show him.

    Joe


    On 1/18/2010 7:25:41 PM Lenin said ..
    Hi...

    Can someone help me?...

    I have installed an evaluation version of Sharepoint 2007 server, with the enterprise client license key product, I have activated the features regarding enterprise edition and the software doesn't send me an error message but when I want to create the column the "business data" is not shown.

    Does anyone know about it?....

    thanks in advance....


    regards.


    On 6/9/2010 3:08:14 PM Tabish said ..
    Hi,

    Now there is tool to do all these stuffs(creating the XML) Called BDC METAMAN.


    thanks for this tutorial,


    On 10/19/2010 11:58:47 PM Bill said ..
    I have the same problem as Ben - 8/21/2009


    Application definition import failed. The following error occurred: Entity could not be found using criteria 'name LIKE [AdventureWorksDW2008].[dbo].[DimProductCategory]'. Error was encountered at or just before Line: '209' and Position: '16'.


    in my case, line 209 is the parameter declared in method FK_DimProductSubcategory_DimProductCategory:


    <Parameters>


    - <Parameter Direction="In" Name="@ProductCategoryKey_AdventureWorksDW2008_dbo_DimProductCategory">


    <TypeDescriptor TypeName="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IdentifierEntityName="[AdventureWorksDW2008].[dbo].[DimProductCategory]" IdentifierName="ProductCategoryKey" Name="ProductCategoryKey" />


    </Parameter>


    any insights to this?