Represents a pre-compiled SQL statement or query, with or without IN parameters.
Public NotInheritable Class ULCommand Inherits System.Data.Common.DbCommand Implements System.ICloneable
public sealed class ULCommand : System.Data.Common.DbCommand, System.ICloneable
All members of ULCommand class, including all inherited members.
Name | Description |
---|---|
Initializes a ULCommand object. | |
Initiates the asynchronous execution of a SQL statement that is described by this ULCommand object. | |
Initiates the asynchronous execution of a SQL statement that is described by this ULCommand object, and retrieves the result set. | |
This method is not supported in UltraLite.NET. | |
Provides a ULParameter object for supplying parameters to ULCommand objects. | |
Finishes asynchronous execution of a SQL statement. | |
Finishes asynchronous execution of a SQL statement, returning the requested ULDataReader. | |
ExecuteDbDataReader method (Inherited from System.Data.Common.DbCommand) |
Executes the command text against the connection. |
Executes a statement that does not return a result set, such as a SQL INSERT, DELETE, or UPDATE statement. | |
Executes a SQL SELECT statement and returns the result set. | |
UL Ext: Executes a SQL SELECT statement and returns the result set as a ULResultSet object. | |
Executes a SQL SELECT statement and returns a single value. | |
UL Ext: Retrieves a database table in a ULTable object for direct manipulation. | |
Pre-compiles and stores the SQL statement of this command. | |
Specifies the text of the SQL statement or the name of the table when the ULCommand.CommandType property is System.Data.CommandType.TableDirect. | |
This feature is not supported by UltraLite.NET. | |
Specifies the type of command to be executed. | |
The connection object on which to execute the ULCommand object. | |
Indicates if the ULCommand object should be visible in a customized Windows Form Designer control. | |
UL Ext: Specifies the name of the index to open (sort) the table with when the ULCommand.CommandType property is System.Data.CommandType.TableDirect. | |
Specifies the parameters for the current statement. | |
UL Ext: Returns the access plan UltraLite.NET uses to execute a query. | |
Specifies the ULTransaction object in which the ULCommand object executes. | |
Specifies how command results are applied to the DataRow when used by the ULDataAdapterUpdate method. |
This object can be used to execute a statement or query efficiently multiple times.
ULCommand objects can be created directly, or with the ULConnection.CreateCommand method. This method ensures that the command has the correct transaction for executing statements on the given connection.
The ULCommand.Transaction method must be reset after the current transaction is committed or rolled back.
The ULCommand class features the following methods for executing commands on an UltraLite.NET database:
Method | Description |
---|---|
ULCommand.ExecuteNonQuery | Executes a statement that does not return a result set, such as a SQL INSERT, DELETE, or UPDATE statement. |
ULCommand.ExecuteReader() | Executes a SQL SELECT statement and returns the result set in a ULDataReader object. Use this method for creating read-only result sets. |
ULCommand.ExecuteResultSet() | UL Ext: Executes a SQL SELECT statement and returns the result set in a ULResultSet object. Use this method for creating mutable result sets. |
ULCommand.ExecuteScalar | Executes a SQL SELECT statement and returns a single value. |
ULCommand.ExecuteTable() | UL Ext: Retrieves a database table in a ULTable object for direct manipulation. The ULCommand.CommandText property is interpreted as the name of the table and the ULCommand.IndexName property can be used to specify a table sorting order. The ULCommand.CommandType property must be System.Data.CommandType.TableDirect. |
You can reset most properties, including the ULCommand.CommandText property, and reuse the ULCommand object.
For resource management reasons, it is recommended that you explicitly dispose of commands when you are done with them. In C#, you may use a using statement to automatically call the System.ComponentModel.Component.Dispose method or explicitly call the System.ComponentModel.Component.Dispose method. In Visual Basic, you always explicitly call the System.ComponentModel.Component.Dispose method.
ULCommand constructor
BeginExecuteNonQuery method
BeginExecuteReader method
Cancel method
CreateParameter method
EndExecuteNonQuery method
EndExecuteReader method
ExecuteNonQuery method
ExecuteReader method
ExecuteResultSet method
ExecuteScalar method
ExecuteTable method
Prepare method
CommandText property
CommandTimeout property
CommandType property
Connection property
DesignTimeVisible property
IndexName property
Parameters property
Plan property
Transaction property
UpdatedRowSource property
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |