SharePoint BDC: Quick & Dirty Jumpstart

Originally posted on: http://geekswithblogs.net/SoYouKnow/archive/2009/09/21/sharepoint-bdc-quick-amp-dirty-jumpstart.aspx

Okay, there are a LOT of great blogs and information already out there about the BDC.  So, I’m not going to reinvent the wheel here and teach you about it. I will, however, provide you with some useful links to help you get started and understand it. 

I will also use this blog post as my starting point for when I forget something.  🙂

Getting Started – Your very first use of the BDC

First thing you have to do is download BDC Meta Man from LightningTools.  Buy it if you can afford it, but the free trial is a perfect place to get you started.  It generates your XML file for you and is super easy to use.  You can create a quick definition with these simple steps:

  1. Click on “Connect to data source:” to connect to your database server
  2. Expand the database that contains the tables you want to use
  3. Drag and drop the target table onto the “Design Service”
  4. Click on “Build->Generate All”.

Of course this is a super simple example that just selects all the data from the given table, but it’s a great starting place for digging in and learning the BDC.  After you generate your XML you need to import it into SharePoint.  The following blog post from Tobias Zimmergren has a section on importing and using the xml file.  It’s really easy to follow and the first part of the blog walks you through another way of creating the ADF (XML file): 

Okay… so if you followed those 4 steps for BDC Meta Man and then deployed it as it says in the blog post you start to get an idea for how quick and easy it can be to do simple things using the BDC. 

<update>

So, I forgot to mention that you need to add a Business Data List Web Part and connect it to your application to test it out.  This is really easy to do and the blog post I mentioned from Tobias also has a great tutorial for connecting both a Business Data List Web Part and a Business Data Item Web Part.  Check it out.

</update>

I’m still very much a beginner at this and don’t have a lot to offer, but here are some other things I can share:

Versioning your XML file

First lesson you need to learn, if you are modifying an existing ADF, make sure you increment the version of the file in the XML!  If you don’t, the upload in Central Admin will fail:

image

You can either modify the XML file directly or edit the Version in the “LOB System / Instance Management” section of BDC Meta Man (Right click on the top most node of the explorer window on the bottom left of screen and click on “edit”).

Creating Filters Using BDC Meta Man

So, you probably want to add a filter and give your users some control over what they can see?  Yeah, I thought so.  Well, you can either figure it out and edit the XML yourself, or you can again use BDC Meta Man to do this for you.

  1. The windows in the bottom left of your BDC Meta Man screen should contain an tree view of all the tables you have dropped into the ‘Design Surface’.  Right click on the table that you wish to filter and select “Edit”.  This takes you to “Entity Management”
  2. Click on the “Methods” tab
  3. Click on “New Filter”
  4. Give the filter a Name
  5. Select the ‘Filter Type’ (Wildcard or Comparison)
  6. Choose the column to filter on
  7. Choose the Operator (choice will change depending on type of field selected)
  8. Enter a default value
  9. Click on ‘Save’
  10. Click on ‘Save’ again.
  11. Click “Build->Generate All”
  12. Follow the steps for uploading the the XML in Central Admin (again, make sure you implement the Version number)

There you go.  How long would would this have taken you before?  At least a couple seconds longer.

A Word About Authentication Mode

Well crap, I had this whole section typed up before I found that LightningTools had already done a much better job than I could:

Business Data Catalog (BDC) Authentication and Authorization

AuthenticationMode can drive you crazy if you don’t know what’s going on under the covers.

So, What Else?

Wow, this really is just the tip of the iceberg.  Seriously, this is like .0005% of what you can do.  There is a ton of good information on the LightningTools website. Again, I’m just getting started, but sometimes that’s the hardest part.  Hopefully this will help a couple of people out there get a jumpstart in the right direction.  I do want to also think Bob Fox (@bfox11b) and Tom Resing (@resing) for getting ME pointed in the right direction on this stuff.  Thanks guys.

Families in Germany who are facing divers soundness problem, such persons can buy drugs from the Web without prescription. With the market flooded with divers web-sites selling sundry medicaments, purchasing medicines from th WEB is no longer a trouble for common man. Certain medications are used to treat infections caused by dental abscesses. Of course it isn’t all. If you’re concerned about erectile soundness problem, you probably know about Xenical and Hoodia. Probably every adult knows about Garcinia. (Read more PhentermineXenical). The symptoms of sexual heartiness problems in men include improbability to have an erection sufficient for sexual functioning. Certain medications may add to sex drive difficulties, so its substantial to cooperate with your health care professional so that the prescription can be tailored to your needs. Preparatory to grab Levitra or other medicament, speak to your druggist if you have any allergies. Talk to your health care provider for more details. Preparatory to ordering this remedy, tell your physician if you are allergic to anything.