Takes you through the process of creating a
Enterprise Developer database project to use as you complete the remainder of these tutorials.
- 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
- Launch
Enterprise Developer
for Visual Studio 2015
- This procedure varies.
- If your operating system is UAC-enabled, you should start
Enterprise Developer as an administrator. If you need instructions, see
To start
Enterprise Developer as an administrator, and follow the instructions for your Windows version.
- If your operating system is not UAC-enabled, you can start
Enterprise Developer as a regular user. If you need instructions, see
To start
Enterprise Developer, and follow the instructions for your Windows version.
- Create a New Database Project
-
The SQL CLR Integration feature in
Enterprise Developer
for Visual Studio 2015 provides a project template named
SQL Server Database Project, which is configured specifically for SQL CLR. Here, you create a Visual Studio project based on this template.
- In Visual Studio, click
.
- In the
New Project dialog box, expand
.
- Select Database.
- In the center pane, select SQL Server Database Project.
- In the
Name field, type
SQLCLRTutorial.
- In the
Location field, specify a directory in which to store the project; then click
OK.
Visual Studio creates a solution containing two projects: a COBOL project named
SQLCLRTutorial, and a publishing project named
SQLCLRTutorial.Publish. The
.Publish project references the COBOL project.
- Set Project Properties
-
- From the Solution Explorer, double-click
Properties under your
SQLCLRTutorial COBOL project.
- On the
SQL tab, select
OpenESQL from the
ESQL Preprocessor drop-down list.
- Click
Add.
- On the
Available Directives list, click
DBMAN; then click
OK.
- Repeat steps
3 and
4, but this time add the
BEHAVIOR directive.
Note: The default value for both DBMAN (ADO) and BEHAVIOR (OPTIMIZE) are correct, so you don't need to make any value changes.
- Click
Save ().
- From the Solution Explorer, open the project properties for the
.Publish project.
- On the
Project Settings tab, set the
Target Platform to the version of Microsoft SQL Server that you are using.
- On the
Debug tab, click the
Edit button associated with
Target Connection String.
- In the
Server Name field, type
. (dot) to indicate the local SQL Server instance.
- From the
Database name drop-down list, select
SQLCLR_Test; then click
OK.
- Click
Save (), and then close both Properties windows.
- Phase 4: Set OpenESQL Assistant Options
-
- In Visual Studio, click
Tools > Options > Micro Focus > OpenESQL Assistant.
- In the
Mode field, click the drop-down list and select
ADO.NET.
- In the
Type Stored Procedure field, select
SQLCLR; then click
OK.
This concludes this tutorial. Please continue with
Tutorial: Create an ADO.NET Connection or
Tutorial: Generate a COBOL Wrapper for a SQL CLR Stored Procedure.