Gunnar Peipman's ASP.NET blog

ASP.NET, C#, SharePoint, SQL Server and general software development topics.

Sponsors

News

 
 
 
DZone MVB

Links

Social

How to connect Business Data Catalog (BDC) lists to other SharePoint lists

Recently I had to create Web Part connection between BDC based list and usual SharePoint list. BDC list was provider and usual SharePoint list was consumer. I was pretty surprised if found out that I was able to connect BDC based list only to other BDC based Web Parts. All the other Web Parts were not able to be consumers for them. Same time BDC lists were able to be consumers of the other web parts.

 

NB! This blog is moved to gunnarpeipman.com

Click here to go to article

Comments

Pete H said:

Thanks! This was really helpful. I had also been trying to figure this out, and was totally baffled by the lack of resource on the interenet, and the useless MSDN information.

Then I saw your code - hooray! I grabbed the consumer part code, tinkered with it, and I now have a custom web part that connects to a BDC list! Thanks!

As well as tailoring your code for my needs, I found what I guess are a couple of typos: specifically, I had to change "portal.IEntityInstanceProvider" to "IEntityInstanceProvider", and "System.string" to "System.String". Nice work!

# December 5, 2007 11:10 AM

Prashant said:

Thanks!

Post was very helpful for us. There are very less resources on these topics.

After reading your post we managed to connect our web part with bdc list.

Thanks Again

# June 18, 2008 1:30 AM

Prashant said:

Thanks!

Post was very helpful for us. There are very less resources on these topics.

After reading your post we managed to connect our web part with bdc list.

Thanks Again

# June 18, 2008 1:32 AM

Hobby said:

Thank you for this post !

Not to repeat predecessors, but straight to the point.

I made a Web part out of this code, but the routine in constructor seems to fail, because I get Error message:

Unable to add selected web part(s).

BDCXmlViwer: Cannot import this web part.

P.S. "BDCXmlViewer is the name of my Web part

Is there anyone who can help ?

Thanx in advance...

# June 18, 2008 8:54 AM

Hobby said:

Can we "mortal poeple" get class above in one piece perhapse.

I'm a little confused about this "NB! Add this code to the end of class given below.". Maybe it's just a typo...

I am trying to understand machanics of your code.

Maybe a really simple (if it can be more simple) example just to be able to connect to BDC Web Part?

Tahnk you

# June 18, 2008 9:18 AM

DigiMortal said:

I wrote this code just to connect one BDC web part to "usual" web part. There are many ways how one can extend this functionality. Web parts have different connection interfaces. My implementation, as you can see when looking at class (the first code listing) uses row provider interface. There are also interfaces to provide cell values, filters, lists etc.

It is really up tu you what kind of functionality you need. Of course, it is also possible to write universal web part but it takes time because also BDC has many features you have to consider and test blindly (okay, through reflection).

# June 18, 2008 12:50 PM

Pierre said:

Hi

Great post!

I'm trying to do something similar but in the same time different.

Well i have a workflow designed with SPD who will compare data between a list A and data from SQL database(4 tables =~1000 000 lines).

One solution was to upload the data on daily basis in a sharepoint list, but the problem is that it takes aprox 15h to upload the data.On update it takes the double!

Another solution is to create a custom action which will pull data from a BDC web part(connect to MS SQL).

What do you think about my challenge? Is it possible? How should i proceed?

Any ideas? Code? Links?  

# August 19, 2008 11:00 AM

DigiMortal said:

If you can do it in database server then do it there. SharePoint lists are very resource expensive when you want to do bulk operations on larger lists.

# August 19, 2008 11:56 AM

niceguymattx said:

Just wanted say this post is awesome - really helped me in building custom business data consumer web parts. There's not a lot of stuff out there on this (that I could find) and this article really helped!

Cheers again

# January 21, 2009 12:13 PM

Crysfurry said:

Для Вас создать музыкальный сайт,музыкальные новинки,музыкальный портал,радио хит.

# June 28, 2009 4:54 AM

Иванов Александр Владимирович said:

Фирма оказывает услуги юристы он-лайн, защита прав интеллектуальной собственности, аудиторские услуги консультационные Киев, помощь адвоката онлайн

# August 6, 2011 2:43 AM

Иванов Александр Владимирович said:

Компания оказывает услуги онлайн консультация адвоката, договор  на оказание аудиторских услуг, контроль качества аудиторских услуг Киев, адвокат услуги

# August 7, 2011 10:58 AM