Code Sample: Federated Search SQL Server Connector
Published: May 2010
By using the Federated Search SQL Server Connector sample, you can learn how to create a connector that can return federated search results from a Microsoft SQL Server database.
This sample shows how to do the following:
Implement a basic federated search connector.
Query an instance of a database that is running on the local server and return the results to SharePoint Enterprise Search in RSS format.
Provide search results HTML for a More Results link.
Create a location for the federated search connector by using the Search Administration site.
Test the sample by configuring an instance of the Federated Search Results Web Part to use the location for the federated search connector.
The complete code for this sample is available in the Federated Search SQL Server Connector Sample resource page.
To use the Federated Search Connector sample, you must have the following installed in your development environment:
Microsoft SharePoint Server 2010
Microsoft SQL Server 2008 on the same server with SharePoint Server 2010.
Microsoft Visual Studio 2010 with Microsoft Visual C# or Microsoft Visual Basic enabled
Obtain the AdventureWorksDW database and install it on the server running SQL Server, as follows:
Go to SQL Server 2008 SR4.
By default, the SQL Server sample databases are designed to use Microsoft SQL Server 2008. If you have Microsoft SQL Server 2005 installed, you must select SQL Server 2005 SP2a from the Releases list before downloading the sample databases, or the installation will fail. For more information about installing the sample databases, see Microsoft SQL Server Community Projects & Samples Home.
The following topics walk you through how to create a federated search SQL Server connector and deploy it: