Posts Tagged Application Definition File

Creating Business Data Catalog(BDC) using Application Definition File(ADF) – SharePoint 2007

Accessing the data from the database Or some other external data source and display on a SharePoint site is not a big deal these days. As developers we can create a web part and deploy it on the SharePoint but without writing any code, how we can display? BDC is the way to do so…!

Business Data Catalog

I am going to use very basic steps to create the BDC on my SharePoint 2007. If you want to create from the scratch without using any tools such as Application Definition Designer then you can follow this post.

These are the simple 4 steps I am going to use:

  1. Create a table and insert some values in SQL Server database
  2. Create an ADF using Application Definition Designer
  3. Import the ADF file into the Shared Service Provider(SSP)
  4. Configure the BDC on SharePoint
CREATE A TABLE AND INSERT SOME VALUES IN SQL SERVER DATABASE

You can see this post to create a sample database and we will retrieve this data using BDC. I have named Database1 and Table1

CREATE AN APPLICATION DEFINITION FILE (ADF) USING APPLICATION DEFINITION DESIGNER (ADD)

You can see this post to create an ADF sample and the file name is ADF_Table1

IMPORT THE ADF FILE INTO THE SHARED SERVICE PROVIDER (SSP)

Go to Central Administration (CA) and click your shared service provider (SSP) (Mine is SharedServices2)

Click Import application definition in the Business Data Catalog section

Click Browse, and select the ADF which we have created in the previous step


Keep other values in their default, and then click Import.


You will be getting this success message!

Click OK to finish the process!

If you want to manage the security just click the manage permissions and do so, that’s all we are done with the step 3! 🙂

CONFIGURE THE BDC ON SHAREPOINT

The last step is to use the Business Data List Web Part to show our data, go to any site and add a Business Data List Web Part to the page.

Open the tool pane

In the Business Data List task pane, click the browse button

The following Business Data Type Picker popup window will appear, you could see our Application Data File, Select the ADF_Table1_Instance

Click OK and publish the page, you can see the data on the web part!

That’s all guys! Happy BDC ing, we will see next BCS on SharePoint 2010! Ensoy..!!

References:

http://msdn.microsoft.com/en-us/library/ms563661(v=office.12).aspx

http://msdn.microsoft.com/en-us/library/bb410048(v=office.12).aspx

Advertisements

, , , , , , , , ,

Leave a comment

Create an Application Definition File (ADF) using Application Definition Designer (ADD)

What is ADF?

This is an XML file that describes your data source, how to connect to it, and the various queries, actions, and filters to display and sort the data. There are many way to create this ADF such as Application Definition Designer (ADD) and BDCMetaMan, I am going to use ADD to create the ADF.

Okay, we will see the steps here:

1. Installing and configuring the “Application Definition Designer” tool.

Please follow the steps in my previous post.

2. Creating the ADF using Application Definition Designer

Step 1: Open the ADD start –> programs –> Application Definition Designer

Step 2: You will be getting the designer and click on “Add LOB System”

Step 3: Then click on Connect to Database, you will be getting this dialog box to select the DB connection

Step 4: Choose connection type and enter connection string (I have created a database sample for this, you can see here)

Connection Type: SQL Server
Connection String: “Data Source=<ServerName>;Initial Catalog=Database1;Integrated Security=True”

Step 5: Click Connect button and you will be getting this window

Step 6: Click Add table tab and drag & drop the Database1.dbo.Table1 on the Design Surface

Step 7: Click Ok and then you will prompt to get the name of LOB, enter the name and click OK (I have given ADF_Table1)

Step 8: You will get the screen like this

Please note: We need to do few modifications to complete this task, otherwise we will be getting the following error when we use this ADF on the SharePoint1  😦

“There are no Business Data Types loaded in the Catalog – Business Data Type Picker”

 I have a post about this error in my previous article, please check it out.

Step 9: So Expand “FindAll_[Database1].[dbo].[Table1]” node under Methods and click Instances

In the Instances node click “FindAll_[Database1].[dbo].[Table1]_Instance” and you can see the properties of this method.

You can see the “MethodInstanceType” property has “IdEnumerator” method instead of the “Finder”. So just click the drop down list and select the Finder method.

Step 10: That’s all we done with the ADF now, just click the export button and get the file

You can see the ADF (xml) file now 🙂

Thanks R./

, , , ,

3 Comments

There are no Business Data Types loaded in the Catalog – Business Data Type Picker

I was working on BDC (Business Data Catalog), to display the user profile data from SQL Server in SharePoint 2007. I was using “Application Definition Designer”  (A Microsoft tool that comes with the SharePoint Server SDK, you can see the installation and configuration here) to generate the ADF (Application Definition File). I tried to access the Business Data Types on the SharePoint page and then I have got the following wired error message. 🙂

BDC is not a really new stuff, so I tried to find the solution on the web but I didn’t get any direct solution immediately. Most of them are suggested to check the permission but I have adequate permission for BDC. Finally I have got the solution form this thread. Actually this is a bug in the Application Definition Designer and I don’t really know why it’s still there!

There might be two reasons to getting this error.

1. Not having enough permission to access the BDC

2. The “Finder” method is not generating properly in the “MethodInstanceType” property.

In my case I had adequate permisioion for the BDC, so the  “Finder” method was my problem.

You can see the “MethodInstanceType” property has “IdEnumerator” method instead of the “Finder”. So just click the drop down list and select the Finder method.

Then just export the ADF again, the Business Data Type Picker is showing the entries now huh? 🙂

References:

1. http://social.msdn.microsoft.com/forums/en-US/sharepointbdc/thread/c069a168-5dd9-4f5e-90bf-872e0ce00d28 

2. http://lightningtools.com/blog/archive/2010/08/19/there-are-no-business-data-types-loaded-in-the-catalog.aspx

, , , , , , , , , , ,

2 Comments