Answered by:
Writing SQL query in BCS

Question
-
Hi Everyone,
Till now i used BDC for MOSS 2007. In that i can able to change the query what ever i want to display in the sharepoint site in the XML file or in application definition designer tool. Now i am moving to SharePoint 2010 BCS . In this can i write my own query and is it possible to display the data in the sharepoint site. I followed the following the below article and created external content type with filters . Upto this i m fine.
http://arsalkhatri.wordpress.com/2012/01/07/external-list-with-bcs-search-filters-finders/
http://lightningtools.com/blog/archive/2010/01/14/creating-comparison-and-wildcard-filters-for-bcs-in-sharepoint-designer.aspxBut my requirement is where can i write my sql query. So did any one work on this. Please help me how to write our own sql query and display the data in the sharepoint list. Please donot use Visual Studio. Without using visual studio is it possible for getting my requirement.
If any article is there on this please share the linkThanks in advance,
Kishore
Kishore
- Edited by Kishorekv Thursday, April 19, 2012 12:01 PM
Thursday, April 19, 2012 11:59 AM
Answers
-
Kishore,
I've used a 3rd party shareware add on to simply enter my query to connect a SharePoint 2007 list to external data:
http://www.layer2.de/en/products/Pages/SharePoint-Business-Data-List-Connector.aspx
See the video on page. Hope that helps.
Thanks, Frank
- Marked as answer by Kishorekv Thursday, April 19, 2012 2:03 PM
Thursday, April 19, 2012 1:21 PM -
Hi Kishore,
In SharePoint 2010 you may also correct BDC Model file (XML file) manually and modify SQL query in it. You may export deployed BDC Model either via SharePoint designer or through Central Administration. After that you will be able to modify XML BDC Model file and import it again as you did in SharePoint 2007.
Dmitry
Lightning Tools Check out our SharePoint tools and web parts | Lightning Tools Blog
- Edited by Dmitry Kaloshin Friday, April 20, 2012 9:15 AM
- Marked as answer by Kishorekv Friday, April 20, 2012 1:16 PM
Friday, April 20, 2012 9:12 AM
All replies
-
Kishore,
I've used a 3rd party shareware add on to simply enter my query to connect a SharePoint 2007 list to external data:
http://www.layer2.de/en/products/Pages/SharePoint-Business-Data-List-Connector.aspx
See the video on page. Hope that helps.
Thanks, Frank
- Marked as answer by Kishorekv Thursday, April 19, 2012 2:03 PM
Thursday, April 19, 2012 1:21 PM -
Hi Frank,
Thanks for sharing nice video. Can you please guide me how to add the filters to filter the data. Can you also tell me is there anyother way without using the 3rd party tool?
Thanks and regards,
Kishore
Kishore
- Edited by Kishorekv Thursday, April 19, 2012 2:10 PM
Thursday, April 19, 2012 2:05 PM -
Kishore,
You can filter on different levels with BDLC. First you can filter directly in the SQL query, e.g. using a "where" expression. Finally you can filter using views in SharePoint for your list data, web parts for dynamic filters. So you have all native list features available...
Thanks, Frank
Thursday, April 19, 2012 2:24 PM -
Hi Kishore,
In SharePoint 2010 you may also correct BDC Model file (XML file) manually and modify SQL query in it. You may export deployed BDC Model either via SharePoint designer or through Central Administration. After that you will be able to modify XML BDC Model file and import it again as you did in SharePoint 2007.
Dmitry
Lightning Tools Check out our SharePoint tools and web parts | Lightning Tools Blog
- Edited by Dmitry Kaloshin Friday, April 20, 2012 9:15 AM
- Marked as answer by Kishorekv Friday, April 20, 2012 1:16 PM
Friday, April 20, 2012 9:12 AM -
Hi Dmitry,
Thanks for your answer. Is there any way other than this. We want personalization also. So can you please guide me.
Thanks
Kishore
Kishore
Friday, April 20, 2012 1:18 PM -
Hi Kishore,
The way to do an import and export? An export you my do via SharePoint designer. You should right click on the external content type and export the BDC Model.
Dmitry
Lightning Tools Check out our SharePoint tools and web parts | Lightning Tools Blog
Friday, April 20, 2012 4:08 PM