
'Declaration Public NotInheritable Class TdDataAdapter Inherits System.Data.Common.DbDataAdapter Implements System.ComponentModel.IComponent, System.Data.IDataAdapter, System.Data.IDbDataAdapter, System.ICloneable, System.IDisposable
'Usage Dim instance As TdDataAdapter
public sealed class TdDataAdapter : System.Data.Common.DbDataAdapter, System.ComponentModel.IComponent, System.Data.IDataAdapter, System.Data.IDbDataAdapter, System.ICloneable, System.IDisposable
public ref class TdDataAdapter sealed : public System.Data.Common.DbDataAdapter, System.ComponentModel.IComponent, System.Data.IDataAdapter, System.Data.IDbDataAdapter, System.ICloneable, System.IDisposable
The TdDataAdapter retrieves data from the SQL Engine and fills a single DataTable within a DataSet. It is also capable of reconciling changes (UPDATE, INSERT, DELETE) to the DataTable to the SQL Engine.
TdDataAdapter can create the DataTable(s) from SELECT statement�s metadata, or it can map the result set(s) to an existing DataTable(s). In either case, data is retrieved from the SQL Engine and inserted / merged into the DataTable. For additional information on naming conventions see DbDataAdapter.Fill method.
TdDataAdapter, working in conjunction with TdCommandBuilder, is capable of automatically generating DML (UPDATE, INSERT and DELETE) statements for reconciling updates to a DataSet. However, UpdateCommand, InsertCommand and DeleteCommand properties can be manually setup as needed or alternatively registered to listen for RowUpdating events and to modify the DML generated by the TdCommandBuilder.
The Data Provider will detect a Parameter declaration discrepancy when Batch Update (TdDataAdapter.UpdateBatchSize > 1) is enabled and Data.Common.DataAdapter.ContinueUpdateOnError is set to true. The Data Provider detects that the TdParameter.IsNullable property is set to false but the TdParameter.Value is set to DBNull.Value. The Data Provider sets the Data.DataRow.HasErrors property to true and Data.DataRow.RowError property to Error # 121007 when it detects this issue. The SQL Engine will detect this discrepancy when Batch Update (UpdateBatchSize == 1) is turned off or ContinueUpdateOnError is set to false. The SQL Engine will return error # 2869.
public DataSet CreateDataSet(String connectionString, String commandText) { TdDataAdapter adapter = new TdDataAdapter(connectionString, commandText); DataSet ds = new DataSet(); adapter.Fill(ds); return ds; }
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DataAdapter
System.Data.Common.DbDataAdapter
Teradata.Client.Provider.TdDataAdapter
Product | Versions | Platforms |
---|---|---|
.NET | 2.1, 3.1, 6 | Windows, Linux, MacOS |
.NET Framework | 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 | Windows |
.NET Standard | 2.0 | Windows, Linux, MacOS |