Automatically generates single-table commands used to reconcile changes made to a System.Data.DataSet with the associated database.
 Visual Basic syntax
 Visual Basic syntaxPublic Class ULCommandBuilder Inherits System.Data.Common.DbCommandBuilder
 C# syntax
 C# syntaxpublic class ULCommandBuilder : System.Data.Common.DbCommandBuilder
 Base classes
 Base classes Members
 MembersAll members of ULCommandBuilder class, including all inherited members.
| Name | Description | 
|---|---|
| Initializes a ULCommandBuilder object. | |
| 
 | Allows the provider implementation of the ![[external link]](gif/external.gif) System.Data.Common.DbCommandBuilder class to handle additional parameter properties. | 
| 
 | Releases the unmanaged resources used by the ![[external link]](gif/external.gif) System.Data.Common.DbCommandBuilder and optionally releases the managed resources. | 
| Gets the automatically generated ULCommand object required to perform deletions on the database. | |
| Gets the automatically generated ULCommand object required to perform insertions on the database. | |
| 
 | Returns the name of the specified parameter in the format of @p#. | 
| 
 | Returns the placeholder for the parameter in the associated SQL statement. | 
| 
 | Returns the schema table for the ![[external link]](gif/external.gif) System.Data.Common.DbCommandBuilder. | 
| Gets the automatically generated ULCommand object required to perform updates on the database. | |
| 
 | Resets the ![[external link]](gif/external.gif) System.Data.Common.DbCommand.CommandTimeout, ![[external link]](gif/external.gif) System.Data.Common.DbCommand.Transaction, ![[external link]](gif/external.gif) System.Data.Common.DbCommand.CommandType, and ![[external link]](gif/external.gif) System.Data.UpdateRowSource properties on the ![[external link]](gif/external.gif) System.Data.Common.DbCommand. | 
| 
 | Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier, including properly escaping any embedded quotes in the identifier. | 
| 
 | Clears the commands associated with this ![[external link]](gif/external.gif) System.Data.Common.DbCommandBuilder. | 
| 
 | Adds an event handler for the ![[external link]](gif/external.gif) System.Data.OleDb.OleDbDataAdapter.RowUpdating event. | 
| 
 | Registers the ![[external link]](gif/external.gif) System.Data.Common.DbCommandBuilder to handle the ![[external link]](gif/external.gif) System.Data.OleDb.OleDbDataAdapter.RowUpdating event for a ![[external link]](gif/external.gif) System.Data.Common.DbDataAdapter | 
| 
 | Given a quoted identifier, returns the correct unquoted form of that identifier, including properly un-escaping any embedded quotes in the identifier. | 
| 
 | Sets or gets the ![[external link]](gif/external.gif) System.Data.Common.CatalogLocation for an instance of the ![[external link]](gif/external.gif) System.Data.Common.DbCommandBuilder class. | 
| 
 | Sets or gets a string used as the catalog separator for an instance of the ![[external link]](gif/external.gif) System.Data.Common.DbCommandBuilder class. | 
| 
 | Specifies which ![[external link]](gif/external.gif) System.Data.ConflictOption is to be used by the ![[external link]](gif/external.gif) System.Data.Common.DbCommandBuilder. | 
| Gets or sets a ULDataAdapter object for which SQL statements are automatically generated. | |
| 
 | Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. | 
| 
 | Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. | 
| 
 | Gets or sets the character to be used for the separator between the schema identifier and any other identifiers. | 
| 
 | Specifies whether all column values in an update statement are included or only changed ones. | 
 Remarks
 RemarksThe ULDataAdapter does not automatically generate the SQL statements required to reconcile changes made to a System.Data.DataSet with the associated data source. However, you can create a ULCommandBuilder object to automatically generate SQL statements for single-table updates if you set the SelectCommand property of the ULDataAdapter. Then, any additional SQL statements that you do not set are generated by the ULCommandBuilder.
 See also
 See also Example
 ExampleThe following example uses the ULCommand, along with ULDataAdapter and ULConnection, to select rows from a data source. The example is passed a connection string, a query string that is a SQL SELECT statement, and a string that is the name of the database table. The example then creates a ULCommandBuilder.
| ' Visual Basic
Public Shared Function SelectULRows(ByVal connectionString As String, _
    ByVal queryString As String, ByVal tableName As String)
    Dim connection As ULConnection = New ULConnection(connectionString)
    Dim adapter As ULDataAdapter = New ULDataAdapter()
	adapter.SelectCommand = New ULCommand(queryString, connection)
 	Dim builder As ULCommandBuilder = New ULCommandBuilder(adapter)
    connection.Open()
    Dim dataSet As DataSet = New DataSet()
    adapter.Fill(dataSet, tableName)
    'Insert code to modify data in DataSet.
    'Without the ULCommandBuilder this line would fail
    adapter.Update(dataSet, tableName)
    Return dataSet
End Function | 
The following code is the C# language equivalent:
| // C#
public static DataSet SelectULRows(string connectionString,
    string queryString, string tableName)
{
    using (ULConnection connection = new ULConnection(connectionString))
    {
        ULDataAdapter adapter = new ULDataAdapter();
        adapter.SelectCommand = new ULCommand(queryString, connection);
        ULCommandBuilder builder = new ULCommandBuilder(adapter);
        connection.Open();
        DataSet dataSet = new DataSet();
        adapter.Fill(dataSet, tableName);
       	// Insert code to modify data in DataSet.
        // Without the ULCommandBuilder this line would fail
        adapter.Update(dataSet, tableName);
        return dataSet;
    }
} | 
ULCommandBuilder constructor
GetDeleteCommand method
GetInsertCommand method
GetUpdateCommand method
DataAdapter property
|  | Discuss this page in DocCommentXchange.
                   | Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |