Prepare to Debug LookupEMP in a Development Environment

Takes you through the process of preparing your Visual Studio project such that you can debug your stored procedure in a development environment both locally and remotely.

Open the SQLServerSP solution

  • From the Visual Studio main menu, click File > Recent Projects and Solutions, and then select the SQLServerSP solution.

Add the SQLServerSPCall project to the SQLServerSP solution

  1. From the Solution Explorer, right-click the SQLServerSP solution and select Add > Existing Project.
  2. Browse to the folder containing the SQLServerSPCall project.
  3. Select the SQLServerSPCall.cblproj file; then click Open.

    Visual Studio adds the SQLServerSPCall project to the SQLServerSP solution.

Set Properties for the SQLServerSPCall Project

  1. From the Solution Explorer, open the Properties window for the SQLCLRTutorialCall project.
  2. On the Debug tab, check Enable SQL Server debugging, located in the Debug Options group.

    Because Visual Studio runs in 32-bit, and the connection to SQL Server that you created previously using the ADO.NET Connection Editor runs in 32-bit, you need to set the Platform target to build the console application as a 32-bit program before you can execute your stored procedure.

  3. On the COBOL tab, select x86 from the Platform target drop-down list.
  4. Click Save Save; then close the Properties window.