Updating data through the BDC

The Business Data Catalog (BDC) is one of the best features of MOSS 2007 (no, it's not in WSS 3.0). What excites me is the prospect of not only reading from, but writing back to data sources defined in the BDC. It's recently come up a few times and I've found that many people believe that updating source data is simply not possible, so I second-guessed myself and went back for a closer look to clarify the reality.

The goal is to create, update, and delete data in addition to retrieving collections, single items and enumerators. There are two ways to do it, and both aren’t quite ends in themselves though only a little extra work is required for deletes.

The first method is to treat the BDC source simply as a data reader, and to build your create/update/delete logic in an assembly. The BDC object model provides the means to retrieve collections, list items and enumerators, and you do the rest. You get the Web Parts to display data, but you still need to roll your own forms inside web parts to create and update.

The other way is with Actions. Think of an action as simply a Link which appears beside each BDC item. In constructing the link, you can inject parameters from the selected BDC row. So the easiest here is Delete, though even that requires building a page that invokes the Delete method and then redirects back to the calling page (assuming the reload will show the revised list). Create and Update still require a form to edit content, and you could launch such a form from an Action. Again the BDC isn’t the end in itself. Additional benefit is that Actions are displayed in BDC Web Parts. They’re great for things like +1, -1, Map this location, Go buy this book, or Go see this product’s web page.

A third way that I don't consider "SharePoint" though it is "Office" is to create an Action which opens an InfoPath form to edit a BDC object. It’s the recommended solution. It requires InfoPath. It does work. Coming from a web background, I want SharePoint to be my web platform so requiring any application besides a browser seems klunky to me.

Before today, I thought there way another way but it turns out it doesn’t have all the pieces to work. You specify a data source's methods in the BDC’s configuration. The standard types are Finder, SpecificFinder, and IDEnumerator, and additional methods can be defined with the GenericInvoker type. I thought you could plug parameters into a GenericInvoker to run ops on a specific item, but its parameters aren't row-specific. So, it’s fine for invoking simple methods on the source, launching processes, and perhaps to lookup lists of available choices for a particular field, but doesn’t mean much for creating or updating new records.

So yes, you can specify methods that update a data source from a BDC configuration file, but they don’t automatically give you consistent ways for a user to create or update records. The easiest way to make forms to update items in BDC data sources is with InfoPath. Back to the Studio.

And then there's LOBi, for "Line-of-business Integration." This is the successor to the Information Bridge Framework (IBF). My understanding was that LOBi builds on the BDC, and then a product like Duet builds on LOBi for a specific data source. In Duet's case that source is SAP. The LOBi document linked above seems to dispute this and positions LOBi as a read-write alternative to the BDC. So maybe it was originally explained to me by someone in sales or marketing, for whom "builds on" means "it costs more and does more" rather than "y uses x as its underlying technology." Either way, LOBi would seem to solve the issue, if only there were a download, documentation, sample code, and a web part or two to refer to. Alas, back to custom code or InfoPath. And Studio.

Until next time,
Eli.

Published Thursday, February 22, 2007 5:45 PM by erobillard

Comments

# Mike Walsh's WSS and more - WSS FAQ - additions and corrections - XXXXIII 19th - 25th February 2007

Sunday, February 25, 2007 9:48 PM by SharepointPM

# re: Updating data through the BDC

Looking for a way to update AD from user profile updates in Sharepoint. Would you recommend infopath forms thru BDC as the best option?

Thanks

Friday, June 08, 2007 5:33 AM by Blog del CIIN

# WSS 3.0 & MOSS: Recopilación de enlaces interesantes (I)

Buceando por los diversos blogs de WSS 3.0 / MOSS a los que estoy suscrito (que buen invento el de las

Saturday, July 07, 2007 3:50 AM by Amgad Mosleh

# re: Updating data through the BDC

Can yo please show us how to create a form and pass to it the paramaters of the BDC record for update or creating new record.(Assumin we have SQL database as our data source)

Thanks

Saturday, September 29, 2007 4:51 PM by TearIzUp

# re: Updating data through the BDC

Awesome Post. My compliments to the author.

--------------------------------SIG----------------------------------

<a href="salvia2.psychepisode.info/">Salvia Divinorum</a>

<a href="salvia2.psychepisode.info/">Buy Salvia Extract</a>

Tuesday, June 10, 2008 11:33 PM by Jonas

# re: Updating data through the BDC

If you want BDC functionality in WSS 3.0 and MOSS standard edition you should look at MashPoint.

community.bamboosolutions.com/.../mashpoint-how-does-it-work.aspx

/Jonas

Sunday, August 31, 2008 12:25 PM by Vishal

# re: Updating data through the BDC

The link that Duet points to in your article (http://www.microsoft-sap.com/) is nowhere close to http://www.duet.com/

Friday, October 17, 2008 3:20 AM by James

# re: Updating data through the BDC

Hi,

Great Article, Do you have a example code whereby Infopath acts in CRUD for the BDC. I am using the BDC to Pass parameters to infopath forms, but how do I update. I am using Oracle 10.

Thanks

James

Friday, June 12, 2009 2:36 AM by Craig

# re: Updating data through the BDC

Updating a BDC connected database through the use of InfoPath forms is actually a very elegant solution as the forms that update the the BDC can be served up in the Web Browser using the Forms Server capabilities of MOSS.  The only requirement for InfoPath will be for the development of the forms.

Both BDC and Forms Server are part of the Enterprise License.

Leave a Comment

(required) 
(required) 
(optional)
(required)