Send feedback on this topic.
Teradata.Client.Provider
TdDataAdapter Constructor(TdCommand)
Example 



Teradata.Client.Provider Namespace > TdDataAdapter Class > TdDataAdapter Constructor : TdDataAdapter Constructor(TdCommand)
An instance of TdCommand. SelectCommand property is initialized to this value and is used to fill a DataSet.
Initializes a new instance of the TdDataAdapter class and sets the SelectCommand property to the passed in TdCommand.
Syntax
'Declaration
 
Public Function New( _
   ByVal command As TdCommand _
)
'Usage
 
Dim command As TdCommand
 
Dim instance As New TdDataAdapter(command)
public TdDataAdapter( 
   TdCommand command
)
public:
TdDataAdapter( 
   TdCommand^ command
)

Parameters

command
An instance of TdCommand. SelectCommand property is initialized to this value and is used to fill a DataSet.
Remarks
A new instance of TdDataAdapter class is initialized with the following default property values.
Property Initial Value
AcceptChangesDuringFill true
ContinueUpdateOnError false
DeleteCommand null
InsertCommand null
MissingMappingAction MissingMappingAction.Passthrough
MissingSchemaAction MissingSchemaAction.Add
SelectCommand selectCommand parameter
UpdateCommand null

The selectCommand parameter initializes the SelectCommand property. See the SelectCommand property to determine how it is used to fill the DataSet. SelectCommand is also used by the TdCommandBuilder to generate DML statements.

Example
The following example creates an instance of TdDataAdapter class, sets some of the properties and fills a DataSet.
public DataSet ExecuteQuery(TdCommand selectCmd)
{
    DataSet ds = new DataSet();
    TdDataAdapter adapter = new TdDataAdapter(selectCmd);
    adapter.Fill(ds);
    return ds;
}
Requirements

Target Platforms: Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

See Also

Reference

TdDataAdapter Class
TdDataAdapter Members
Overload List