Migrating to ADO.NET within Net Express with .NET

When migration existing ODBC applications to the Net Express with .NET environment, i.e. those compiled with the SQL(DBMAN=ODBC) directive, such applications should execute as-is under .NET. However, if you wish to make use of ADO.NET providers, i.e. to compile using the SQL(DBMAN=ADO) directive, you will need to perform some additional steps. This document summarizes those steps for you.

Using the OpenESQL Assistant, accessible from the Visual Studio .NET IDE, under the Tools -> Micro Focus Tools menu, you will need to access the Connection Editor. From within there, you will need to create an ADO.NET Data Source Name (DSN).

      

Micro Focus has tested OpenESQL Applications using the following ADO.NET providers :

  • IBM DB2 (shown as IBM.Data.DB2.DB2Connection)
  • Microsoft provider for ODBC (System.Data.Odbc.OdbcConnection)
  • Microsoft provider for OleDb (System.Data.OleDb.OleDbConnection)
  • Microsoft provider for Oracle (System.Data.OracleClient.OracleConnection)
  • Microsoft provider for MS SQL Server (System.Data.SqlClient.SqlConnection)
  • Oracle ODP.NET provider (Oracle.DataAccess.Client.OracleConnection)   

To aid you in migrating your application to ADO.NET, Micro Focus provides some pre-generated DSN's for the above providers. The entries for each DSN are specific to each provider, but you will typically need to replace server or database names with those for your system in order to use them. You can use the 'Test Connection' facility to verify the settings before using the DSN within your application.

      

The choice of provider to use for your database is down to your specific requirements. For migration purposes, it may be easiest to firstly use the ODBC provider, and once you're happy with your application, then move to a managed ADO.NET provider from your database software vendor.