# Class NpgsqlOperationInProgressException

Namespace
  Npgsql

Assembly
  Npgsql.dll

Thrown when trying to use a connection that is already busy performing some other operation. Provides information on the already-executing operation to help with debugging.

    public sealed class NpgsqlOperationInProgressException : NpgsqlException, ISerializable

Inheritance
  object
  Exception
  SystemException
  ExternalException
  DbException
  NpgsqlException
  NpgsqlOperationInProgressException

Implements
  ISerializable

Inherited Members
  NpgsqlException.IsTransient
  NpgsqlException.BatchCommand
  DbException.SqlState
  ExternalException.ToString()
  ExternalException.ErrorCode
  Exception.GetBaseException()
  Exception.GetType()
  Exception.Data
  Exception.HelpLink
  Exception.HResult
  Exception.InnerException
  Exception.Message
  Exception.Source
  Exception.StackTrace
  Exception.TargetSite
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.ReferenceEquals(object, object)

## Constructors

### NpgsqlOperationInProgressException(NpgsqlCommand)

Creates a new instance of NpgsqlOperationInProgressException.

    public NpgsqlOperationInProgressException(NpgsqlCommand command)

#### Parameters

`command` NpgsqlCommand

  A command which was in progress when the operation which triggered this exception was executed.

## Properties

### CommandInProgress

If the connection is busy with another command, this will contain a reference to that command. Otherwise, if the connection if busy with another type of operation (e.g. COPY), contains null.

    public NpgsqlCommand? CommandInProgress { get; }

#### Property Value

NpgsqlCommand