Takes you through the process of creating a
Visual COBOL database project to use as you complete the remainder of these tutorials.
Create the SQLServerSP project
The SQL CLR Integration feature in
Visual COBOL uses 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
.
- Click the
Database category.
- In the center pane, select
SQL Server Database Project.
- Complete the fields as follows:
Name
|
SQLServerSP
|
Location
|
c:\tutorials\SQL
|
Solution Name
|
SQLServerSP
|
Framework
|
Choose the appropriate .NET Framework version from the drop-down list.
Note: Must be version 4.5 or later.
|
- Uncheck
Create directory for solution.
- Click
OK.
Set project properties
- From the
Solution Explorer, double-click
Properties under your
SQLServerSP COBOL project.
- On the
Application tab, set the
Output type to
Console.
- 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.