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
-
- From the Visual Studio IDE, open the
SQLCLRTutorial solution you created and updated in previous tutorials.
- From the Solution Explorer, right-click the
SQLCLRTutorial solution and select
Add > Existing Project.
- Browse to the folder containing the
SQLCLRTutorialCall project.
- Select the
SQLCLRTutorialCall project; then click
Open.
- Phase 2: Set Properties for the SQLCLRTutorialCall Project
-
- From the Solution Explorer, open the Properties for the
SQLCLRTurotialCall project.
- 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.
- On the
COBOL tab, select
x86 from the
Platform target drop-down list.
- 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.