RemoteDataAdapter Class
From RemObjects Software
This is a Data Abstract Architecture entry
Feel free to add your notes to this topic below.
Overview (.NET)
Represents client-side access to a set of data tables published on the server.
It's similar to the other DataAdapter descendants provided by the .NET Framework (SqlDataAdapter, OleDbDataAdapter, etc) and you can use it to retrieve schema information, to fill a DataSet with data from the server or to apply local updates back to the server.
The RemoteDataAdapter supports Dynamic Method Binding to give you tight control over how methods are invoked on the remote server to fetch or apply data. By default, a newly instantiated RemoteDataAdapter is configured for the standard methods provided by Data Abstract 4.0 servers, as defined in IDataAbstractService, but you can manually adjust its DataRequestCall, DataUpdateCall and SchemaCall properties to control the calls that are made.
Namespace
Declaration (C#)
[Designer("RemObjects.DataAbstract.Designtime.RemoteDataAdapterDesigner, RemObjects.DataAbstract.DesignTime, Version=4.0.0.414, Culture=neutral, PublicKeyToken=3df3cad1b7aa5098"), ToolboxBitmap(typeof(RemoteDataAdapter), "Glyphs.RemoteDataAdapter.bmp")] public class RemoteDataAdapter : BaseComponent, ISupportInitialize;
Hierarchy
- RemObjects. Common.BaseComponent
- RemObjects.DataAbstract.RemoteDataAdapter
Properties
| | | |
|---|---|---|
| CacheSchema | Boolean | Specifies whether a local cached copy of the service Schema is used when referencing the Schema property or performing actions that need access to schema information, such as calling FillSchema.
If set to true, the schema will be downloaded from the server when first needed, and subsequent accesses will use the already downloaded version. If set to false, a new request will be made to re-download the schema on every request. You will usually only set this property to false if you expect the schema information to change frequently and dynamically on the server. |
| DataRequestCall | DataRequestRequest | Defines the remove service call that will be executed to Fill a dataset with data from the remote server.
By default, it will be mapped to the GetData call as defined in the IDataAbstractService interface implemented by standard Data Abstract 4.0 servers, but you can change its sub-properties to control how the data request call is made, if you are using a custom server interface. |
| DataStreamer | DataStreamer | Specifies the DataStreamer to be used for decoding and encoding data that is received from or sent back to the server.
Data Abstract uses Data Streamers to control how data is streamed between client and server applications. This allows the communication to use different data encodings based on your application's specific needs. These can be small and efficient binary encoding using the BinStreamer, cross-platform and easily parsable XML format with the upcoming XmlDataStreamer, or custom formats you can provide by implementing your own streamer class. |
| DataUpdateCall | DataUpdateRequest | Defines the remote service call that will be executed to Update the server data with local changes.
By default, it will be mapped to the UpdateData call as defined in the IDataAbstractService Interface implemented by standard Data Abstract 4.0 servers, but you can change its sub-properties to control how the data update call is made, if you are using a custom server interface. |
| RemoteService | RemoteService | References the RemoteService component that defines the service to call for fetching and updating data and for retrieving schema information.
By default, assigning a RemoteService component to this property will set the same service to be used for all three DataRequestCall, DataUpdateCall and SchemaCallrequests. However, you can override this by assigning a different RemoteService to the individual requests's RemoteService property. |
| Schema | Schema | Returns the data Schema provided by the connected RemoteService.
If necessary, the schema will be retrieved from the server; the value of the CacheSchema property will determine whether the schema will be downloaded repeatedly on each request, or if a local cached copy will be used after the schema has been retrieved once. Use this property and the classes exposed provided by the RemObjects.DataAbstract.Schema namespace to manually inspect the available data tables and commands, and their details. |
| SchemaCall | SchemaRequest | Defines the remote service call that will be executed to fetch schema information from the remote server.
By default, it will be mapped to the GetSchema call as defined in the IDataAbstractService Interface implemented by standard Data Abstract 4.0 servers, but you can change its sub-properties to control how the schema request call is made, if you are using a custom server interface. |
| Status | RemoteAdapterStatus | Read-only property that indicates the current status of the adapter.
You can use it to determine if the adapter is Idle or busy processing a request such as fetching data, applying updates or retrieving schema information. |
Methods
| | |
|---|---|
| Fill | This method fetches data from the server and fills one of more data tables in the local dataset.
Optionally, a list of table names can be passed to limit the number of tables that are fetched. If no list is provided, all tables defined in the dataset will be filled. Also, an optional TableRequestInfo instance may be passed in to provide additional options. |
| FillSchema | Retrieves schema information for all of the specified data tables, and configured their Fields and Params setup to match the schema from the server. |
| FlushSchema | Clears the locally cached schema and ensures that the next time schema's data is needed, it will reloaded from the server.
This method only has an effect if CacheSchema property is set to true. |
| ReadSchema | Returns the data Schema provided by the connected RemoteService.
If necessary, the schema will be retrieved from the server; the value of the CacheSchema property will determine whether the schema will be downloaded repeatedly on each request or if a local cached copy will be used after the schema has been retrieved once. Use this property and the classes exposed provided by the RemObjects.DataAbstract.Schema namespace to manually inspect the available data tables and commands, and their details. |
| RemoteDataAdapter | Default constructor for RemoteDataAdapter. |
| SetupDefaultRequests | Resets all four request objects to the default setup used for the new v4.0 service interface. |
| Update | Applies changes made to the local dataset back to the server.
Optionally, a list of table names can be passed to limit the number of tables that updates will be applied for. If no list is provided, changes in all tables part of the dataset will be applied. |
Events
| | |
|---|---|
| AfterFillDataSet | Fires after the RemoteDataAdapter has finished fetching data for an entire dataset.
If the dataset contains multiple data tables, separate AfterFillDataTable events will be fired for each data table before AfterFillDataSet itself is fired. Use this event if you want to display status messages while filling the dataset, or need to take custom actions after the Fill completes. |
| AfterFillDataTable | Fires after the RemoteDataAdapter is finished with fetching data for an individual data table.
Use this event if you want to display status messages while filling the data tables, or need to take custom actions after the Fill completes. |
| AfterFillDataTableSchema | Fires after the RemoteDataAdapter has finished retrieving the schemainformation for an individual data table.
Use this event if you need to take custom actions after the schema retrieval completes, such as making manual modifications to the setup of the data table. |
| AfterMergeDelta | Fires after the RemoteDataAdapter has finished merging the delta received back from an Update into the local dataset.
Use this event if you want to display status messages while filling the dataset, or if you need to take custom actions after the merge completes. |
| AfterUpdateDataSet | Fires after the RemoteDataAdapter has finished sending updated data to the server.
Use this event if you want to display status messages while filling the dataset, or if you need to take custom actions after the Update completes. |
| BeforeFillDataSet | Fires before the RemoteDataAdapter starts fetching data for an entire dataset.
If the dataset contains multiple data tables, separate BeforeFillDataTable events will be fired for each data table after BeforeFillDataSet itself is fired. Use this event if you want to display status messages while filling the dataset, or if you need to make adjustments to the RemoteDataAdapter's configuration before the Fill begins. |
| BeforeFillDataTable | Fires before the RemoteDataAdapter starts fetching data for individual data table.
Use this event if you want to display status messages while filling the data tables, or need to take custom actions after the Fill completes. |
| BeforeMergeDelta | Fires before the RemoteDataAdapter starts merging the delta received back from an Update into the local dataset.
Use this event if you want to display status messages while filling the dataset, or if you need to take custom actions before the merge starts. |
| BeforeUpdateDataSet | Fires before the RemoteDataAdapter starts sending updated data to the server.
Use this event if you want to display status messages while filling the dataset, or need to take custom actions before the Update starts. |
See Also
Product: RemObjects Data Abstract
Current version: Data Abstract 'Vinci' (5.0)
Lists — Glossary — Features — How To — Drivers — Components — Tools — Samples — Articles — Architecture — Issues
Categories: Text | Data Abstract | Architecture | Class | .NET
