Important: To use the SQL Server Database Project template, you must install the
ASP.NET and web development tools feature from the Visual Studio IDE (see
To install missing features from the IDE for details).
Visual COBOL provides the
SQL Server Database Project template to accommodate SQL CLR integration. It enables you to create SQL CLR stored procedures in or add them to your
Visual COBOL project. You can deploy and publish your stored procedures to SQL Server 2008 R2 using the .NET Framework 3.5 or earlier,
and to SQL Server 2012 and later using any version of the .NET Framework, including the most recent.
With this template, Visual Studio generates two projects in a single solution:
- .NET COBOL Project
- From this project, you can access user interface features that enable you to create SQL CLR stored procedures, including the
following options available from the
Project menu and also from the project's context menu:
-
- Add User-Defined Function
- Add Stored Procedure
- Add Aggregate
- Add Trigger
- Add User-Defined Type
- Add Script
- Add Stored Procedure Definition
Each of the following COBOL program templates is generated automatically and added to your project when you add a SQL CLR
object. Each template includes all of the mandatory code required for its respective SQL CLR object type:
- Function1.cbl
- StoredProcedure1.cbl
- Aggregate1.cbl
- Trigger1.cbl
- Type1.cbl
- .Publish Project
- This project is the mechanism used to deploy to your SQL Server database. It includes a reference to the COBOL project contained
within the same solution. When you publish this project, it also deploys everything defined in the referenced .NET COBOL project.
- Project objects:
- script.COBOL.RuntimeInstall.sql - an SQL script that installs the COBOL Run-Time System as part of the deployment and publishing process.
- script.COBOL.RuntimeInstall_ADO.sql - an SQL script that installs the ADO.NET run-time system as part of the deployment and publishing process.
- script.COBOL.RuntimeUninstall.sql - an SQL script that uninstalls the COBOL run-time system when the deployment and publishing processes have completed.
- COBOL project reference - a reference to the .NET COBOL project added when you created the solution.