Dynamic Select Sample (.NET)

From RemObjects Wiki
Jump to: navigation, search

This is a Data Abstract for .NET Samples topic

Contents



Purpose

The sample shows how to use the DynamicSelect feature to decrease network traffic and server load, retrieving only needed columns.

DataAbstractDynSelectSample1.png

Examine the code

  • Take a look at the bFill_OnClick event handler to see how you can fill the DataSet using the DynamicSelect feature:

this.fLocalDataSet = lUseDynamicSelect? (DataSet)new WorkersDataset(): (DataSet)new WorkersFullDataset();
this.workersBindingSource.DataSource = this.fLocalDataSet;
this.workersBindingSource.DataMember = "Workers";
this.dgvCustomers.DataSource = this.workersBindingSource;

this.remoteDataAdapter.DynamicSelect = lUseDynamicSelect;

...

this.remoteDataAdapter.Fill(this.fLocalDataSet);
  • Look at the bUpdate_OnClick event handler to see how updates of the local DataSet can be applied to the SQL server database:

this.remoteDataAdapter.Update(this.fLocalDataSet);

Note that the Update operation always uses the DynamicSelect mode of the previous Fill operation.

Getting started

  • Run the Sample Server.
  • Run the Dynamic Select Sample.
  • Try to fill and update the DataSet using the DynamicSelect feature.
  • Look at the server log to see the SQL command used on the server and estimate the amount of data sent to the client application.
  • Try to fill and update the DataSet not using the DynamicSelect feature.
  • Look at the server log again to see the amount of data sent to the client application by the server.

Editions and Languages

Concepts Covered

See Also


Product: RemObjects Data Abstract
Available Editions: Data Abstract for .NET, Xcode, Delphi, Java and JavaScript

GlossaryArticlesFeaturesLibrarySamples

Personal tools
Namespaces

Variants
Actions
Navigation
products
platforms
special
Toolbox