Friday, November 21, 2008

Business Data Catalog (BDC) Part - 2

Hi All,

Here i am back again with part 2 of Business Data Catalog.

See Business Data Catalog (BDC) Part - 1

Business Data Catalog (BDC) Part - 3

Business Data Catalog (BDC) Part - 4

Business Data Catalog (BDC) Part - 5

Business Data Catalog (BDC) Part - 6

Business Data Catalog (BDC) Part - 7

Read the above part1 to understand BDC concept, because many things in this part are in seqence. so before starting on part 2, i recommend you go through part 1 and then after reading part 2, you can readu further part of series.

Ok, let’s continue our discussion on BDC. Earlier in part 1, we discussed how single data can be returned based on query of au_fname.

Now we will change the query, so that we can enhance our example and expand it to return multiple result set.

Take the same XML that we have used in our first part, we will modify it.

Find the section where we have written.

SELECT au_fname, city, state,address FROM authors WHERE au_fname = @au_fname.


Change this line to

SELECT au_fname, city, state,address FROM authors WHERE City LIKE @City.

Notice the difference is parameter change and same way instead of = operator, I used LIKE so that it can return multiple result set.

Find the FileDescriptor by au_fname and replace it with the following file descriptor.

If you observe, we have changed Type from Comparator to Wildcard.


<FilterDescriptor Type="Wildcard" Name="City" >
<Properties>
<Property Name="UsedForDisambiguation" Type="System.Boolean">true</Property>
</Properties>
</FilterDescriptor>

Change the Parameter tag also where you have au_fname. Change it to City like below.

<Parameter Direction="In" Name="@City">
<TypeDescriptor TypeName="System.String" IdentifierName="au_fname" AssociatedFilter="City" Name="city">
<DefaultValues>
<DefaultValue MethodInstanceName="AuthorFinderInstance" Type="System.String">%</DefaultValue>
</DefaultValues>
</TypeDescriptor>
</Parameter>

Ok, we are ready with our changes; all you have to do is perform the same steps performed in part 1.

Go to your SSP, under Business Data Catalog, import business definition. Import the definition, you will find the same warning coming again. Ignore it for now too.

Go back to your site; add web part of type business data list. And use this new application and now you will find city as parameter instead of au_fname.



I will continue with part 3 of BDC where we will explore BDC in more detail.

No comments:




Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com