Mimer Data Provider

MimerCommandBuilder Class

This class automatically generates SQL commands used to reconcile changes made to a DataSet or DataTable with the associated database server.

For a list of all members of this type, see MimerCommandBuilder Members.

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         Mimer.Data.Client.MimerCommandBuilder

[Visual Basic]
NotInheritable Public Class MimerCommandBuilder
    Inherits Component
[C#]
public sealed class MimerCommandBuilder : Component
[C++]
public __gc __sealed class MimerCommandBuilder : public Component
[JScript]
public  class MimerCommandBuilder extends Component

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The MimerDataAdapter does not automatically generate the SQL statements required to reconcile changes made to a DataSet. However, you can create a MimerCommandBuilder object that generates SQL statements for single-table updates by setting the SelectCommand property of the MimerDataAdapter. Then, the MimerCommandBuilder generates any additional SQL statements that you do not set.

The relationship between a MimerDataAdapter and its corresponding MimerCommandBuilder is always one-to-one. To create this correspondence, you set the DataAdapter property of the MimerCommandBuilder object. This causes the MimerCommandBuilder to register itself as a listener, which produces the output of RowUpdating events that affect the DataSet.

To generate INSERT, UPDATE, or DELETE statements, the MimerCommandBuilder uses the SelectCommand property to retrieve a required set of metadata. If you change the value of SelectCommand after the metadata has been retrieved (for example, after the first update), you then should call the RefreshSchema method to update the metadata.

The MimerCommandBuilder also uses the Connection, CommandTimeout, and Transaction properties referenced by the SelectCommand. You should call RefreshSchema if any of these properties are modified, or if the value of the SelectCommand property itself is changed. Otherwise the InsertCommand, UpdateCommand, and DeleteCommand properties retain their previous values.

If you call Dispose, the MimerCommandBuilder is disassociated from the MimerDataAdapter, and the generated commands are no longer used.

Requirements

Namespace: Mimer.Data.Client

Assembly: Mimer.Data.Client (in Mimer.Data.Client.dll)

See Also

MimerCommandBuilder Members | Mimer.Data.Client Namespace