.NET to IBM i connectivity with NTi.

General considerations.

Connection pool.

As of version 3.2.3, NTi includes a fully managed .NET connection pool, optimizing access to IBM i programs and data.

Rather than opening and closing a connection on every request, pooling reuses existing connections, reducing latency and resource consumption. It avoids the overhead of repeatedly creating QZDASOINIT jobs and ensures precise connection tracking to prevent the accumulation of "ghost" connections.

When pooling is enabled:

  • Connections stay open and are reused by the application instead of being closed and reopened on every request.
  • Performance improves: the overhead of IP resolution, TCP connection establishment, and authentication is significantly reduced.
  • Connections are properly closed when no longer needed, ensuring clean and efficient IBM i resource management.

💡The connection pool is enabled by default as of NTi 3.2.3 and can be configured via the connection string.

Multi-factor authentication (MFA).

As of version 4.4.0, NTi supports IBM i built-in multi-factor authentication (MFA) via TOTP. When opening a connection, the OTP code can be provided:

  • via an AdditionalFactorCallback callback, triggering an interactive user prompt.
  • via an AdditionalFactor connection property, passed directly.

💡 Introduced by IBM in the latest IBM i releases (V7R6+), MFA provides an additional layer of security for connections.

For more details on enabling MFA and the IBM i side configuration, see the Multi-Factor Authentication (MFA).

One instance = one TCP connection = one IBM i job.

Each NTiConnection instance holds a TCP socket to connect to IBM i, creating a tight coupling between the instance, the connection, and the IBM i job.

When a NTiConnection instance is destroyed by the .NET Garbage Collector, the underlying TCP connection is immediately closed and destroyed, causing the corresponding IBM i job to stop. This mechanism gives the user full control over connections.

Connection string.

Like most database providers, NTi uses a connection string to obtain the information required to connect to IBM i (username, password, etc.). This connection string may contain sensitive information. Many approaches exist to secure connection string and configuration file management. The available NTi connection string keywords are detailed in the NTiConnection properties reference below.

💡Always refer to the official .NET documentation and recommendations for secure implementation.


ADO.NET implementation.

This class implements the standard ADO.NET methods and properties for database access operations, including:

  • Open()
  • Close()
  • CreateCommand()
  • BeginTransaction()
  • Commit()
  • Rollback()
  • ...

NTi therefore integrates seamlessly into any existing application built with other providers such as ODBC or OleDB drivers.

💡 The default ADO.NET implementation is documented in any ADO.NET reference, for example via the System.Data.Common namespace documentation.

What's next?