Mimer Provider Manager

Converting an application to Mimer Provider Manager

To convert an existing ADO.NET application to use the Mimer Provider Manager, in general, you need to take the following steps:

  1. For each provider a unique prefix is used for all variable declarations. You need to know what prefix is used by your current provider. Look for objects such as xxxConnection, xxxDataAdapter, and xxxCommand where xxx is the prefix used by your provider. In addition you need to know the full name of these objects, such as Vendor.Data.Client.xxxConnection or System.Data.xxxClient.
  2. Replace all references of Vendor.Data.Client with Mimer.Mpm.Data. This includes both using clauses and references that use full names.

  3. Then you should turn your attention to the ADO.NET names of data types used by the provider. These are called xxxDbType or xxxType. You must convert the data types to the names used by the Mimer Provider Manager. These are documented in the MpmType enumeration.

  4. Then you should replace all object references with prefix xxx to prefix Mpm, which is used by the Mimer Provider Manager.

    For example, change xxxCommand to MpmCommand and so on.

  5. Recompile your application. When you recompile the application you may discover that there are provider specific functions that are used by the application. You must consider how to handle these. Either you can use non-portable extensions using the Mimer Provider manager, or you may decide to implement the functionality differently.
  6. Setup a configuration and map the data source you use to your old provider. As part of this job, change the connection logic. In the ConnectionString property of the MpmConnection object choose the desired data source.

  7. Test your application thoroughly.

If you at this point want to make your application portable, try using it with other providers and database systems. To do this, you obviously need to setup the database environment your application needs for different providers.

A difficult area in portability is which SQL syntax to use. Different database vendors support different dialects of SQL and an application that wants to be able to use several underlying database systems must cater for this. If you are in doubt whether an SQL statement follows the SQL standard you can try this at the following site: http://developer.mimer.com/validator.

Another interesting exercise may be to try out the performance of different provider implementations. If you, for example, are using Oracle you can try four different providers: Microsoft's Oracle provider, Oracle's data provider, the Ole Db provider, and finally the Odbc provider.

In the following sections guidelines for individual providers are given.

See Also

Converting from ODBC | Converting from OLE DB | Converting from SQL Server | Converting from Microsoft's Oracle Provider | Converting from Oracle Data Provider