This chapter describes the ADO.NET Connection Editor, which you can use to catalog and uncatalog ADO.NET data providers.
The ADO.NET Connection Editor enables you to edit the repository that stores the connection information used by the OpenESQL managed run-time when a COBOL program connects to an ADO.NET data provider. The repository is a standard .NET Framework repository, machine.config. This enables mixed language applications to share connection strings.
The OpenESQL run time supports any ADO.NET provider that supports the DbProviderFactory API.
Note: We recommend that you automatically catalog ODBC data providers by setting the Automatically catalog data source on CONNECT option for the OpenESQL Assistant rather than cataloging them using the ADO.NET Connection Editor. The ODBC Data Provider supplied by the DbProviderFactory API is a generic provider and provides few options. For information on setting options, see the section Setting OpenESQL Assistant Options in the chapter Using OpenESQL Assistant and your Visual Studio documentation.
This does not apply to reUZE Server.
You can start the ADO.NET Connection Editor from your desktop or from the OpenESQL Assistant IDE. The option to start from your desktop is given to enable easy access to the tool when deploying applications manually.
Note: When you run the ADO.NET Connection Editor under Windows Vista, you must run it as an administrator if you are adding, deleting, or updating connection settings.
OpenESQL Assistant automatically catalogs any ODBC connection as an ODBC ADO.NET data provider if you have set your OpenESQL options to enable automatic cataloging. To use other ADO.NET data providers, you must catalog them manually using the ADO.NET Connection Editor. All cataloged data providers are listed on the Editor.
When you catalog a connection, the ADO.NET Connection Editor supplies default connection settings and values for the type of connection you catalog. You should edit the values to reflect the correct settings for your data source. Micro Focus provides templates for certain ADO.NET data providers as examples of what type of connection settings are required and what their values should be. See the section Example Connection Settings for specific examples.
You also have the option of encrypting your connection settings in the repository. You might want to do this if your connection settings include sensitive information such as a user ID and password used to access your application.
Note: Visual Studio runs in 32-bit mode even if you run it on a 64-bit operating system such as Windows XP/64. If you develop Visual Studio 2005 applications using a 64-bit operating system, OpenESQL Assistant and the ADO.NET Connection Editor from within Visual Studio, the connection information you save in the machine.config file only can be used by 32-bit applications. To save connection information for use by 64-bit applications, you access the ADO.NET Connection Editor from your desktop and catalog the connections in the stand-alone version of the tool. If you have applications that can run in either mode, you must catalog the same information in the ADO.NET Connection Editor in both the stand-alone version and in the version available from within Visual Studio to avoid possible connection errors.
You can also use the ADO.NET Connection Editor to uncatalog an ADO.NET data provider.
This section provides some examples of appropriate connection settings for a SqlClient and a DB2 ADO.NET data provider.
For an SqlClient data provider, you would need to provide the following connection information:
For a DB2 ADO.NET data provider, you would need to provide the following connection information:
You can copy your connection settings from one machine to another using the ADO Connection Editor's Export and Import functions. You do this by exporting the connection settings on one machine and importing them to another.
You can also import connection settings at aNet Express command prompt using the MFImportConn command.
Start a Net Express 32-bit command prompt; then execute the MFImportConn command as follows:
MFImportConn path:\exportedXMLfile
Where path:\exportedXMLfile is the full path to and filename of the XML file containing exported connection settings.
Start a Net Express 64-bit command prompt, and change to your installation's base\bin\win64 directory. Execute the MFImportConn command as follows:
MFImportConn path:\exportedXMLfile
Where path:\exportedXMLfile is the full path to and filename of the XML file containing exported connection settings.
Copyright © 2009 Micro Focus (IP) Ltd. All rights reserved.