If I read data into a datatable using the Adapter.Fill() method the entire resultset is loaded into the datatable. When there are many records this can take a second or 2 and since it is in the loading of the form the form takes a few seconds to show itself.
In delphi I could use a TClientDataSet with packetrecords set to 50 for example to make it not load the entire table when opening and only fetch more records when needed.
Is there a way to do the same in C# using simple datatable components ?
The application is binding all data-aware controls to a bindingsource, that is bound to a datatable that is filled by the Adapter.Fill() method.
方法填充有重载:
public int Fill(int startRecord, int maxRecords, params DataTable[] dataTables);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.