Takes you through the steps required to create a SQL CLR stored procedure for OpenESQL and calling it from an OpenESQL application.
Using the SQL CLR Integration feature in
Visual COBOL, you can code stored procedures, user-defined functions, aggregates, triggers, and user-defined types that contain EXEC SQL
statements, and compile the code using the OpenESQL preprocessor.
The scenario that represents the most common and best use of the SQL CLR Integration feature in
Visual COBOL is that of creating a SQL CLR stored procedure for OpenESQL and calling it from an OpenESQL application. Here, we provide
a series of tutorials that lead you through this processes.
Assumptions
This tutorial is written from the perspective that all of the following is true. Specific instructions for setting up your
environment to adhere to these assumptions is found in the
Before you begin this tutorial section that follows:
- Windows File Explorer is set to show file names and extensions.
- You are running the latest version of
Micro Focus
Visual COBOL, which has been installed on your local machine using default installation settings.
- Windows User Account Control (UAC) is turned off.
- You have installed the
Visual COBOL ASP.NET and Web Applications feature.
- You have installed and can access a supported version of Microsoft SQL Server, including the SQL Server Management Studio
and SQL Server Data Tools.
- Visual COBOL is started on your local machine.
- Your parent project directory is
c:\tutorials\SQL. If you choose to use an alternative parent project directory, adjust the instructions accordingly.
- You have addressed all of the items in the
Before you begin this tutorial section below.
Before you begin
- Install Microsoft SQL Server
- To complete this tutorial, you must have Microsoft SQL Server, including the SQL Server Management Studio and SQL Server Data
Tools, installed and configured on your machine. For information on current supported versions, see the
Database Access - OpenESQL section of the
Additional Software Requirements on Windows topic.
- Install the Microsoft Remote Debugging Monitor (Optional)
- If you intend to debug remotely, you must have the Microsoft Remote Debugging Monitor (msvsmon.exe) installed and started on the remote machine. You can download this software from the Microsoft Web site.
- Set Windows File Explorer options
- These tutorials assume that your Windows File Explorer options are set to use the Details layout, and to show file name extensions.
See your Windows documentation for more information.
- Turn off Windows User Account Control (UAC)
- These tutorials assume that you have turned UAC off by setting it to
Never notify. See your Windows documentation for details.
- Create a parent project directory
- Create a working directory in which to store the projects and other files created or required for this series of tutorials.
This tutorial cites a working directory of
c:\tutorials\SQL.
- Start
Visual Studio
- If you need instructions to get
Visual Studio started on your local machine, see
To start
Visual Studio.
Note: If Visual Studio prompts you on startup to select an initial action, click
Continue without code.
- Install the ASP.NET and Web Applications feature
- See
To install missing features from the IDE for instructions.
Sequence
You must work through
Tutorial: Prepare the SQL Server COBOL Environment before proceeding to either of the other SQL Server COBOL Stored Procedures tutorials, which can then be done in any order: