This sample works only with SQL Server 2005 and SQL Server 2008. It will not work with any version of SQL Server earlier than SQL Server 2005.
The HRResume sample demonstrates how to build a simple multi-tier intranet Microsoft Windows Forms application. The sample demonstrates how to use full-text search on XML documents that are written in several different languages, and combine those results with
other relational queries. The sample also demonstrates the use of XQueries on the server. The sample has been designed so that it can be easily localized.
The default installation directory is C:\Program Files\Microsoft SQL Server\100\Samples\Integrated Samples\HRResume.
Samples are provided for educational purposes only. They are not intended to be used in a production environment and have not been tested in a production environment. Microsoft does not provide technical support for these samples. Sample applications and assemblies
should not be connected to or used with your production SQL Server database or your report server without the permission of the system administrator.
A developer wants to implement a resume processing system that is easy to localize and takes advantage of full-text search.
Transact-SQL, XML, XSD, XSLT, Visual C#, and Visual Basic.
The HRResume sample uses the following features of SQL Server.
||XML, XQuery, Full-text search
Before running this sample, make sure SQL Server is installed, including the following components:
- SQL Server Database Engine
- SQL Server Management Studio
- AdventureWorks sample database available at the
CodePlex Web site.
- Database Engine Samples available at the
CodePlex Web site.
- .NET Framework SDK 2.0 or Microsoft Visual Studio 2005. You can obtain .NET Framework SDK free of charge. See
Installing the .NET Framework Documentation.
Building the Sample
If you have not already created a strong name key file, generate the key file using the following instructions.
To generate a strong name key file
- Open a Microsoft Visual Studio 2005 command prompt. Click Start, point to
All Programs, point to Microsoft .NET Framework SDK 2.0, and then click
SDK Command Prompt.-- or --Open a Microsoft .NET Framework command prompt. Click
Start, point to All Programs, point to Microsoft .NET Framework SDK 2.0, and then click
SDK Command Prompt.
- Use the change directory command (CD) to change the current directory of the command prompt window to the folder where the samples are installed.
Note: To determine the folder where samples are located, click the Start* button, point to
All Programs, point to Microsoft SQL Server, point to Documentation and Tutorials, and then click
Samples Directory. If the default installation location was used, the samples are located in <system_drive>:\Program Files\Microsoft SQL Server\100\Samples.*
- At the command prompt, run the following command to generate the key file:
sn -k SampleKey.snk Important: For more information about the strong-name key pair, see "Security Briefs: Strong Names and Security in the .NET Framework" in the .NET Development Center on MSDN.
To build the sample, do the following:
Build the sample
- Ensure that the AdventureWorks sample database is installed.
- In Management Studio, load and run the Scripts\installCS.sql script to install essential server-side stored procedures and functions.
- In Windows Explorer, right-click the CS\HRWebService folder, click Properties, click the
Web Sharing tab, click Share this folder, and then click OK twice. This creates an IIS virtual folder for the sample that will enable the application to work correctly.
- Build the application in the solution file in the CS folder by using Visual Studio 2005 or Microsoft MSBuild.
Running the Sample
To run the sample, do the following:
Run the sample
- Run CS\HR\bin\Debug\HR.exe.
- Click the Resume table. Enter various search criteria, select whether you want to search for items that match all the criteria or any of them, and then, optionally, select the language you want to use for the full-text search. Click one of the calendar
buttons to use a graphical method of inputting either the start modified date, the end modified date, or both by selecting a range of dates in the calendar control.
- After using the calendar form to select one or more dates, click OK to accept the new dates, or click
Cancel to close the form without changing any dates. Click Search to initiate the search. A summary of the results is shown in a grid. Selecting a row in the grid displays the resume associated with the person mentioned in that row.
Removing the Sample
To remove the sample, do the following:
Remove the sample
- Open the Scripts\Cleanup.sql file in Management Studio and run the contents of the file.
SQL Server End-to-End Samples
Help and Information
- Getting SQL Server 2008 Assistance* © 2008 Microsoft Corporation. All rights reserved.