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.
|Initializes a ULCommand object.|
|Initiates the asynchronous execution of a SQL statement that is described by this ULCommand.|
|Initiates the asynchronous execution of a SQL statement that is described by this ULCommand, 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.|
|Executes a SQL SELECT statement and returns a single value.|
|UL Ext: Retrieves in a ULTable a database table 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 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 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 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 in which the ULCommand executes.|
|Specifies how command results are applied to the DataRow when used by the Update method of the ULDataAdapter.|
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.
ULCommand features the following methods for executing commands on an UltraLite.NET database:
|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. 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. 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 for direct manipulation. The ULCommand.CommandText is interpreted as the name of the table and the ULCommand.IndexName can be used to specify a table sorting order. The ULCommand.CommandType must be System.Data.CommandType.TableDirect.|
You can reset most properties, including the ULCommand.CommandText, 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.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0|