Represents a set of data commands and a connection to a data source that are used to fill the DataSet and update the data source. This class cannot be inherited.
Assembly: System.Data (in System.Data.dll)
Initializes a new instance of theclass.
Initializes a new instance of theclass with the specified SQL SELECT statement.
Initializes a new instance of the OdbcConnection.class with an SQL SELECT statement and an
Initializes a new instance of theclass with an SQL SELECT statement and a connection string.
Gets or sets a value that specifies whether to generate an exception when an error is encountered during a row update.(Inherited from DataAdapter.)
Gets or sets an SQL statement or stored procedure used to delete records in the data source.
Gets or sets the behavior of the command used to fill the data adapter.(Inherited from DbDataAdapter.)
Gets or sets an SQL statement or stored procedure used to insert new records into the data source.
Determines the action to take when incoming data does not have a matching table or column.(Inherited from DataAdapter.)
Gets or sets whether the Fill method should return provider-specific values or common CLS-compliant values.(Inherited from DataAdapter.)
Gets or sets an SQL statement or stored procedure used to select records in the data source.
Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch. (Inherited from DbDataAdapter.)
Gets or sets an SQL statement or stored procedure used to update records in the data source.
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.)
Determines whether the specified object is equal to the current object.(Inherited from Object.)
|Fill(DataSet, Int32, Int32, String)|
|Fill(Int32, Int32, DataTable())|
|FillSchema(DataSet, SchemaType, String)|
Gets the parameters set by the user when executing an SQL SELECT statement.(Inherited from DbDataAdapter.)
Serves as the default hash function. (Inherited from Object.)
Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)
Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)
Returned when an error occurs during a fill operation.(Inherited from DataAdapter.)
Occurs during an update operation after a command is executed against the data source.
Occurs during Update before a command is executed against the data source.
For a description of this member, see ICloneable.Clone.
Indicates how a source table is mapped to a dataset table.(Inherited from DataAdapter.)
For a description of this member, see M:System.Data.IDbDataAdapter.DeleteCommand.
For a description of this member, see M:System.Data.IDbDataAdapter.InsertCommand.
For a description of this member, see M:System.Data.IDbDataAdapter.SelectCommand.
For a description of this member, see M:System.Data.IDbDataAdapter.UpdateCommand.
When the DataSet, it creates the required tables and columns for the returned data if they do not already exist. However, primary key information is not included in the implicitly created schema unless the MissingSchemaAction property is set to AddWithKey. You may also have the create the schema of the DataSet, including primary key information, before filling it with data using FillSchema. For more information, see Adding Existing Constraints to a DataSet.fills a
When you call the Fill method on a data source that does not have a primary key column, thetries to promote the unique constraint column to the primary key. In the process, the marks the unique constraint as not nullable. This behavior works unless there is a null value in the unique constraint column. If there is a null value, the Fill method fails with a constraint violation. To avoid this situation, do not allow null values in the unique constraint column.
Due to the limitations of native ODBC drivers, only one DataTable is ever returned when you call FillSchema. This is true even when executing SQL batch statements from which multiple DataTable objects would be expected.
Public Function GetDataSetFromAdapter( _ ByVal dataSet As DataSet, ByVal connectionString As String, _ ByVal queryString As String) As DataSet Using connection As New OdbcConnection(connectionString) Dim adapter As New OdbcDataAdapter(queryString, connection) ' Open the connection and fill the DataSet. Try connection.Open() adapter.Fill(dataSet) Catch ex As Exception Console.WriteLine(ex.Message) End Try ' The connection is automatically closed when the ' code exits the Using block. End Using Return dataSet End Function
Available since 1.1
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.