Configuring a .NET Core Project for SQL Support

This topic describes the steps you must perform to create a .NET Core project if you want to take advantage of SQL support.

  1. Create your .NET Core project as described in To create a .NET Core project.
  2. Install the required NuGet package for the SQL support:
    1. In the Solution Explorer, right-click your project and click Manage NuGet Packages.

      The Visual Studio NuGet Package Manager is displayed.

    2. Click the Browse tab.
    3. From the Package source drop-down menu, select one of the following packages, and then click Install.
      • MicroFocus COBOL.SqlCLR.Runtime - for ADO1
      • MicroFocus COBOL.SqlODBC32.Runtime[9] - for 32-bit ODBC2
      • MicroFocus COBOL.SqlODBC64.Runtime[9] - for 64-bit ODBC3
    4. Click OK on the Preview Changes dialog box, then click I Accept on the License Acceptance dialog box.
    The selected package and any dependencies are added to the current project, listed under References in the Solution Explorer.
    Note: For the ADO package MicroFocus.COBOL.SqlCLR.Runtime, if you need to install support for a provider other than the SQL Server .NET Core provider you must install an additional NuGet package. See Supported .NET Core Providers for more information.
  3. Use the SQL page of the project properties to set your SQL directives as you would normally. See To set COBOL project properties and SQL Properties for more information.

1 Set the SQL(DBMAN=ADO) directive.

2Set the SQL(DBMAN=ODBC) directive, and set your project properties to build your .NET Core project as x86.

3Set the SQL(DBMAN=ODBC) directive, and set your project properties to build your .NET Core project as x64.