Previous Topic Next topic Print topic


Tutorial: Prepare to Debug in a Development Environment

Note: When connecting to your SQL Server, if Microsoft SQL Server 2012 prompts you with an Attach Security Warning, please click Attach to clear the prompt.
Requirements
Before attempting this tutorial, you must complete the following tutorials in the order listed:
  • Tutorial: Enable SQL CLR Integration
  • Tutorial: Create a Sample Database
  • Tutorial: Create and Configure a Database Project
  • Tutorial: Create an ADO.NET Connection
  • Tutorial: Code a SQL CLR Stored Procedure using OpenESQL Assistant
  • Tutorial: Publish, Debug, and Execute a Stored Procedure
  • Tutorial: Call a Published Stored Procedure
Phase 1: Add the SQLCLRTutorialCall Project to the SQLCLRTutorial Solution
  1. From the Visual Studio IDE, open the SQLCLRTutorial solution you created and updated in previous tutorials.
  2. From the Solution Explorer, right-click the SQLCLRTutorial solution and select Add > Existing Project.
  3. Browse to the folder containing the SQLCLRTutorialCall project.
  4. Select the SQLCLRTutorialCall project; then click Open.
Phase 2: Set Properties for the SQLCLRTutorialCall Project
  1. From the Solution Explorer, open the Properties for the SQLCLRTurotialCall 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 you've created using the ADO.NET Connection Editor to SQL Server 2012 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. Save the project and close the Properties dialog box.

This concludes this tutorial. Please continue with Tutorial: Debug Locally in a Development Environment or Tutorial: Debug Remotely in a Development Environment.

Previous Topic Next topic Print topic