DbDataAdapter Constructors

Definition

Initializes a new instance of the DataAdapter class.

Overloads

DbDataAdapter()

Initializes a new instance of a DataAdapter class.

DbDataAdapter(DbDataAdapter)

Initializes a new instance of the DataAdapter class from an existing object of the same type.

DbDataAdapter()

Source:
DbDataAdapter.cs
Source:
DbDataAdapter.cs
Source:
DbDataAdapter.cs

Initializes a new instance of a DataAdapter class.

C#
protected DbDataAdapter();

Remarks

When you create an instance of DbDataAdapter, the following read/write properties are set to the following initial values.

Properties Initial value
SelectCommand A new IDbCommand.
InsertCommand A new IDbCommand.
DeleteCommand A new IDbCommand.
UpdateCommand A new IDbCommand.
MissingMappingAction MissingMappingAction.Passthrough
MissingSchemaAction MissingSchemaAction.Add

You can change the value of any of these properties through a separate call to the property.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

DbDataAdapter(DbDataAdapter)

Source:
DbDataAdapter.cs
Source:
DbDataAdapter.cs
Source:
DbDataAdapter.cs

Initializes a new instance of the DataAdapter class from an existing object of the same type.

C#
protected DbDataAdapter(System.Data.Common.DbDataAdapter adapter);

Parameters

adapter
DbDataAdapter

A DataAdapter object used to create the new DataAdapter.

Remarks

This overload of the DbDataAdapter constructor is designed for use by a .NET Framework data provider when implementing a similar constructor for use in a clone implementation.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1