ADO.NET Applications from Oracle to PostgreSQL

What is ADO.NET?

ADO.NET is a set of computer software components that programmers can use to access data and data services. It is a part of the base class library that is included with the Microsoft .NET Framework. Oracle provides ADO.NET Data Provider for Oracle database(Oracle.DataAccess.Client) to access Oracle Database. To access PostgreSQL, you can use Npgsql dataprovider, a native ADO.NET Data Provider for PostgreSQL (Npgsql namespace).

Why Ispirer Toolkit?

Ispirer Toolkit is a database and application migration tool that can help you automatically perform comprehensive assessment and migration of embedded SQL statements (dynamic SQL) as well as ADO.NET provider classes & methods in .NET applications. With Ispirer Toolkit there is no need for extracting SQL statements from application code and convert them separately. The automated conversion tool completes the whole migration process internally.

Conversion features

Ispirer software automates the following migration activities:

  • Changing Connection String
  • Changing ADO.NET namespaces:
  • OraclePostgreSQL

  • Mapping Basic ADO.NET Classes:
  • .NET FrameworkOraclePostgreSQL

  • Converting Dynamic SQL language elements and built-in functions with different syntax in Oracle and PostgreSQL
  1. OracleDataAdapter da = new OracleDataAdapter();
  2. da.SelectCommand = new OracleCommand("SELECT SYSDATE FROM DUAL", _conn);
  1. NpgsqlDataAdapter da = new NpgsqlDataAdapter();
  2. da.SelectCommand = new NpgsqlCommand("SELECT LOCALTIMESTAMP; ", _conn);
  • Converting API database parameters with apropriate equivalent from Oracle to PostgreSQL
  2. cmd.Parameters.Add(":PAR", OracleDbType.Varchar2, val, ParameterDirection.Input);
  2. cmd.Parameters.Add(":PAR", NpgsqlTypes.NpgsqlDbType.Varchar, ParameterDirection.Input).Value=val;

How to convert?

A detailed description of such an automated database and application migration process can be found at: Embedded SQL and Database Access API Migration


The product can be an effective assessment tool for your project. The assessment process is a turn-key solution for estimating efforts and costs of automated migration. For ADO.NET and Dynamic SQL in .NET applications conversion the assessment can involve the following:

  • Identify source files containing database access code statements
  • Identify lines of code with database related statements
  • Identify SQL statements

Database and application migration tool Ispirer Toolkit automates the entire migration of ADO.NET and Dynamic SQL in .NET applications. This allows you to dramatically decrease conversion risks and significantly reduce in-house efforts. Reasonable pricing strategy makes Ispirer Toolkit even more powerful instrument for such migration type.