Adds or refreshes rows into the specified System.Data.DataTable.
Visual Basic
Overloads Public Function Fill( _
ByVal dataTable As DataTable _
) As Integer
C#
public int Fill(
DataTable dataTable
);
dataTable A System.Data.DataTable to fill with records and optionally schema.
The number of rows successfully added or refreshed in the System.Data.DataTable.
For large result sets, this can have a significant performance impact. An alternative is to use an ULDataReader when a read-only result set is sufficient, perhaps with SQL statements (ExecuteNonQuery) to carry out modifications. Another alternative is to use a ULTable that allows read-write access to the database.
If ULDataAdapter.SelectCommand does not return any rows, no tables are added and no exception is raised.
For more information, see IDataAdapter.Fill.
System.ArgumentNullException - The dataTable parameter is invalid.
InvalidOperationException - The ULDataAdapter.SelectCommand is invalid or, the table mapping is missing and ULDataAdapter.MissingMappingAction is set to System.Data.MissingMappingAction.Error.