In this post we can learn how to display the business data (AdventuresWorks 2005) in a Business Data List webpart of Sharepoint 2007
- Download the AdventureWorks 2005 sample database
- Install the downloaded sample AdventureWorks 2005 database and attach the installed database because when you install it create the database files in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data (location may vary for some servers) on who needs to see the tables should explictly attach the database
- Now, we are ready to create AdventureWorks metadata using BDC meta man even we can create metadata using Business Data Catalog Editor which comes when you install MOSS SDK 1.4 in this example i am creating hte metadata using BDC meta man
- Go to Start > BdcMetaMan, after opening the BDCmetaman tool click on Content to data source arrow image which display a drop down menu select Sql Server from the list, enter the servername and connect as windows authentication mode.
- After connecting, you can see all the avaliable AdventureWorks database, expand and select Production.[Product] table, drag Production.[Product] on to the designer surface.
- Before generating definition file, set the path and name of the application defintion file in the Configuration > Settings, now we are ready to generate definition file, click on Build > Generate Definition File which generate and saves the file in the path given in configuration option
- Now, go to Shared Services under Business Data Catalog section click on Import Application Definition
- In the import application definition page click the browse button and select the AdventureWroks metadata file, under Resource to import check Permissions and click Import button
- In Business Data Catalog Application page click on the AdventureWorksLOBSystem which displays the context menu click on Manage Permission add NT AUTHORITY\authenticated users in Users\Groups box and choose Select in Clients permission then click Save button
- Now we are almost done, go and add Business Data List webpart in any of the sharepoint site, after adding in edit mode select Modify Shared Webpart and click on Browse (book icon) beside the Type box, then select Production.Produt business data type and click OK
- Now we are ready to view the Prodution.Products table in Business Data List
Note: To view the business data in search result, create New Content Source in Shared Services search settings and configure the new Content Source Type by choosing Business Data, then select crawled selected application and choose database instance, check Start full crawl for this content source to start the full crawl then click OK button