# Class NpgsqlDataAdapter

Namespace
  Npgsql

Assembly
  Npgsql.dll

This class represents an adapter from many commands: select, update, insert and delete to fill a DataSet.

    public sealed class NpgsqlDataAdapter : DbDataAdapter, IComponent, IDisposable, IDbDataAdapter, IDataAdapter, ICloneable

Inheritance
  object
  MarshalByRefObject
  Component
  DataAdapter
  DbDataAdapter
  NpgsqlDataAdapter

Implements
  IComponent
  IDisposable
  IDbDataAdapter
  IDataAdapter
  ICloneable

Inherited Members
  DbDataAdapter.DefaultSourceTableName
  DbDataAdapter.Fill(DataSet)
  DbDataAdapter.Fill(DataSet, int, int, string)
  DbDataAdapter.Fill(DataSet, string)
  DbDataAdapter.Fill(DataTable)
  DbDataAdapter.Fill(int, int, params DataTable[])
  DbDataAdapter.FillSchema(DataSet, SchemaType)
  DbDataAdapter.FillSchema(DataSet, SchemaType, string)
  DbDataAdapter.FillSchema(DataTable, SchemaType)
  DbDataAdapter.GetFillParameters()
  DbDataAdapter.Update(DataRow[])
  DbDataAdapter.Update(DataSet)
  DbDataAdapter.Update(DataSet, string)
  DbDataAdapter.Update(DataTable)
  DbDataAdapter.UpdateBatchSize
  DataAdapter.AcceptChangesDuringFill
  DataAdapter.AcceptChangesDuringUpdate
  DataAdapter.ContinueUpdateOnError
  DataAdapter.FillLoadOption
  DataAdapter.MissingMappingAction
  DataAdapter.MissingSchemaAction
  DataAdapter.ReturnProviderSpecificTypes
  DataAdapter.TableMappings
  DataAdapter.FillError
  Component.Dispose()
  Component.ToString()
  Component.Container
  Component.Site
  Component.Disposed
  MarshalByRefObject.GetLifetimeService()
  MarshalByRefObject.InitializeLifetimeService()
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.ReferenceEquals(object, object)

## Constructors

### NpgsqlDataAdapter()

Default constructor.

    public NpgsqlDataAdapter()

### NpgsqlDataAdapter(NpgsqlCommand)

Constructor.

    public NpgsqlDataAdapter(NpgsqlCommand selectCommand)

#### Parameters

`selectCommand` NpgsqlCommand

### NpgsqlDataAdapter(string, NpgsqlConnection)

Constructor.

    public NpgsqlDataAdapter(string selectCommandText, NpgsqlConnection selectConnection)

#### Parameters

`selectCommandText` string
`selectConnection` NpgsqlConnection

### NpgsqlDataAdapter(string, string)

Constructor.

    public NpgsqlDataAdapter(string selectCommandText, string selectConnectionString)

#### Parameters

`selectCommandText` string
`selectConnectionString` string

## Properties

### DeleteCommand

Delete command.

    public NpgsqlCommand? DeleteCommand { get; set; }

#### Property Value

NpgsqlCommand

### InsertCommand

Insert command.

    public NpgsqlCommand? InsertCommand { get; set; }

#### Property Value

NpgsqlCommand

### SelectCommand

Select command.

    public NpgsqlCommand? SelectCommand { get; set; }

#### Property Value

NpgsqlCommand

### UpdateCommand

Update command.

    public NpgsqlCommand? UpdateCommand { get; set; }

#### Property Value

NpgsqlCommand

## Methods

### CreateRowUpdatedEvent(DataRow, IDbCommand?, StatementType, DataTableMapping)

Create row updated event.

    protected override RowUpdatedEventArgs CreateRowUpdatedEvent(DataRow dataRow, IDbCommand? command, StatementType statementType, DataTableMapping tableMapping)

#### Parameters

`dataRow` DataRow
`command` IDbCommand
`statementType` StatementType
`tableMapping` DataTableMapping

#### Returns

RowUpdatedEventArgs

### CreateRowUpdatingEvent(DataRow, IDbCommand?, StatementType, DataTableMapping)

Create row updating event.

    protected override RowUpdatingEventArgs CreateRowUpdatingEvent(DataRow dataRow, IDbCommand? command, StatementType statementType, DataTableMapping tableMapping)

#### Parameters

`dataRow` DataRow
`command` IDbCommand
`statementType` StatementType
`tableMapping` DataTableMapping

#### Returns

RowUpdatingEventArgs

### OnRowUpdated(RowUpdatedEventArgs)

Raise the RowUpdated event.

    protected override void OnRowUpdated(RowUpdatedEventArgs value)

#### Parameters

`value` RowUpdatedEventArgs

### OnRowUpdating(RowUpdatingEventArgs)

Raise the RowUpdating event.

    protected override void OnRowUpdating(RowUpdatingEventArgs value)

#### Parameters

`value` RowUpdatingEventArgs

## Events

### RowUpdated

Row updated event.

    public event NpgsqlRowUpdatedEventHandler? RowUpdated

#### Event Type

NpgsqlRowUpdatedEventHandler

### RowUpdating

Row updating event.

    public event NpgsqlRowUpdatingEventHandler? RowUpdating

#### Event Type

NpgsqlRowUpdatingEventHandler