• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Data sources in share point 2010

Data sources in share point 2010






Total Views
Views on SlideShare
Embed Views



1 Embed 4

http://paper.li 4



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    Data sources in share point 2010 Data sources in share point 2010 Presentation Transcript

    • Data Sources in SharePoint 2010 Kathy Hughes SharePoint Server MVP Sydney, Australia Kathy Hughes
    • SharePoint Designer 2010 Unleashed book • http://www.amazon.com/SharePoint-Designer-Unleashed- Kathy- Hughes/dp/0672331055/ref=sr_1_3?s=books&ie=UTF8&qid= 1295312377&sr=1-3 Kathy Hughes
    • Tonight • New data source features • Differences between 2007 and 2010 • Data Source Configuration Options in SharePoint Designer 2010 • Check out REST’ful data connections • Debugging data sources • Consuming data sources in a SharePoint site Kathy Hughes
    • SharePoint Conference 2011 • www.sharepointconference.com.au • Sydney, Australia, Hilton Hotel, March 8 and 9, 2011 • www.sharepointconference.co.nz • Wellington, New Zealand, March 16 and 17, 2011 Kathy Hughes
    • SharePoint 2010 Big Picture • Data Sources extend to include: • Integration with server-side and client-side OM • Data Source configuration options in SharePoint Designer 2010 • Data Views • Great alternative for standalone SharePoint Foundation 2010 • SharePoint Server 2010 = extensive opportunites • Access Services – NEW to 2010 • Visio Services – NEW to 2010 • Excel Services - Improved • PerformancePoint Services (SSAS) - improved • InfoPath Services – improved, richer interface and options • Client-side • Access, Excel, Visio, InfoPath (Designer) Kathy Hughes
    • Enter SharePoint Designer! • SharePoint Designer 2010 • Hugely improved UI for working with SharePoint Sites • Extensible customization • Pages • Data • Workflows • Branding • Plus, more… • Ease of use • Code-free! • XSLT and XML friendly tools and intellisense Kathy Hughes
    • Deprecated Features • Things that have been removed in SharePoint Designer 2010 • Can no longer attach other sites within a site collection • Too many security issues • Use RSS or SOAP instead • No more BDC under Data Sources • Replaced by External Content Types (BCS) • No more dependency on application definition files! Kathy Hughes
    • What’s New? • REST’ful Web Services • Connect to SharePoint lists • Powerful filtering, down to item level • External Content Types (AKA BDC) • Now under External Content Types • More powerful integration, wizard-driven CRUD operations • SQL, WCF and .NET types Kathy Hughes
    • Supported Data Sources • SOAP/XML Web Services • XML Files • REST Web Services – NEW (aka Server-side scripts) • Database Connection • Linked Data Sources Kathy Hughes
    • What About the BDC? • Replaced by External Content Types • Business Connectivity Services • Create database connections, .NET type connections, Web Service Connections • Create create, read, update and delete (CRUD) actions • Built in wizards • Code – free • Integrate with Office applications • Add external customer list into Outlook Contacts! • Greater authentication options • Secure ID • Kerberos / impersonation Kathy Hughes
    • Data Source UI Compare Kathy Hughes
    • REST’ful queries • New to SharePoint 2010 • Client-side API • Flexible queries, down to the list item • Query Excel Spreadsheets (Services) with REST • Down to the cell • Another option for sourcing data x-site collections • Connector available in SharePoint Designer 2010 • It works! Kathy Hughes
    • REST APIs Client OM Farm Site List Data External Lists Kathy Hughes
    • REST Requirements • Windows Server 2008 R2 (WFE) or Windows 7 • ADO.NET Data Services Update for .NET 3.5 SP1 • Or • ASP.NET 4.0 framework • SharePoint Designer 2010 • Configure and display REST connections • Data View Web Part • Visual Studio 2010 • Greater flexibility Kathy Hughes
    • REST APIs • Syntax • /_vti_bin/ListData.svc/{Entity}[({identifier})]/[{Property}] • Example to get the Tasks list • /_vti_bin/ListData.svc/Tasks • Returns all Tasks in the designated site • *If the URL returns XML then the service is working… Kathy Hughes
    • REST’ful Response Kathy Hughes
    • Validate REST URL First • In browser is a great way • However, don’t forget to disable your feed formatting • DEMO – disable feed formatter in IE • See http://www.youtube.com/watch?v=ap1XZd1huP8 Kathy Hughes
    • REST APIs • QueryString Parameters • $filter=(simple predicate} • $expand={Entity} • $orderby={property} • $skip=n • $top=n • $metadata • See http://msdn.microsoft.com/en-us/library/cc907912.aspx Kathy Hughes
    • Sample Queries • $filter=(simple predicate} • http://tonka/_vti_bin/listdata.svc/Tasks?$filter=Title eq 'Fourth Task' • $orderby={property} • http://tonka/_vti_bin/listdata.svc/Tasks?$orderby=Title desc • http://tonka/_vti_bin/listdata.svc/Tasks?$orderby=Title asc Kathy Hughes
    • REST Configuration in SPD Kathy Hughes
    • Authentication • Anonymous – site and content must be set to anon • Windows Integrated – doesn’t work for non-authenticated clients, i.e. clients in separate domain – NTLM vs Kerberos • Clear / basic – non-secure, consider, and test with, SSL <DataSources> <SharePoint:XmlUrlDataSource runat="server" id="Tasks2" AuthType="Basic" HttpMethod="GET" InsertCommand="http://tonka/_vti_bin/ listdata.svc/Tasks" AuthUserName="kathyhughesadministrator" AuthPassword=“pword" selectcommand="http://tonka/_vti_bin/listdata.svc/Tasks"/> </DataSources> Kathy Hughes
    • Tasks list back in SharePoint Kathy Hughes
    • DEMO • Querying with REST from SharePoint Designer 2010 • Configure connection in SharePoint Designer • Add to page using a Data View Web Part • http://www.youtube.com/watch?v=gTo6JTVnhkU Kathy Hughes
    • REST in InfoPath • InfoPath story has changed significantly in SharePoint Server 2010 • We can now replace our list forms with InfoPath forms • We can add lookups, rules and queries back to other lists in SharePoint • We can consume existing REST data connections! Kathy Hughes
    • Example of REST in InfoPath Kathy Hughes
    • Troubleshooting Data Sources • What can go wrong? Some things… • Authentication • NTLM or Kerberos? • Single, multiple, non-domain members • Clear text/SSL, • SSO only available with SharePoint Server 2010 (same as 2007) • Database schema mismatch • SharePoint Designer database connection wizard does not understand custom schema, e.g. • Sees SELECT * FROM [Product] rather than SELECT * FROM [Production].[Product] • Query fails • XML and REST Web Services • Be aware that list names ARE case sensitive • i.e. Tasks needs Tasks in the URL parameter and query parameters Kathy Hughes
    • …And, we don’t like to see… Kathy Hughes
    • Troubleshooting • Database connections don’t allow Windows authentication • asp:SqlDataConnection Kathy Hughes
    • How to Debug • Database connections • In SharePoint Designer • fpdatasource folder, which is located under the site’s _catalog’s folder • Check and directly edit the XML • On the SQL Server • Check the logs • Use the SQL Server Profiler • Set up custom ‘profile’ templates to trap errors when accessing tables, etc • Authentication • On the SQL Server • Use the SQL Server Profiler • Trace logins against databases • ‘GUEST’ login is found to be a common error Kathy Hughes
    • SQL Server Profiler Trace Kathy Hughes
    • DEMO • Working with database connections , SQL 2005 or 2008, and custom database schemas • *Custom schema is currently broken in Beta 2 • i.e. entering custom SQL statements fail to ‘hold’ database schema • AdventureWorksDW works because it has the default database schema of DBO. • IMPORTANT: if using SharePoint Server 2007 or 2010 you have the option of using SSO • See http://www.youtube.com/watch?v=pK_NcAstyis Kathy Hughes
    • Check the Database Schema Kathy Hughes
    • What to use when? • If you need to do x-site/site collection queries then use SOAP or RSS • If you want to add a database connection for the ENTIRE site, then use the Data Source Database Connector • If you want to add a database connection for a single page, either: • Leverage an existing site database connection • OR • Add a new connection via the Toolbox > ASP.NET Controls > SqlDataSource and use the GridView control to display the data Kathy Hughes
    • DEMO • Remember we no longer have the option to ‘attach’ list from another site • Instead, we can use SOAP to access x-site data • Use the XML Web Service to access list data from other sites • See http://www.youtube.com/watch?v=QyGdbRv954E Kathy Hughes