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
.
- On the
Create a new project dialog box, scroll down the list, and select
SQL Server Database Project, and then click
Next.
Note: If more than one SQL Server Database Project templates are on the list, select the template for the COBOL language and the
Windows platform.
- Complete the fields as follows:
Project name
|
SQLServerSP
|
Location
|
c:\tutorials\SQL
|
Framework
|
Choose the appropriate .NET Framework version from the drop-down list.
Note: Must be version 4.7.2 or later.
|
- Check
Place solution and project in the same directory.
- Click
Create.
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.