Namespace | System.Data.CONNX | ||
Description | The CNXCommand class is used as the main interface for retrieving data from a CONNX data source. This class accepts an SQL statement to process zero or more CNXParameters objects, and optional CNXTransaction object, and a CNXConnection object, all of which are used to retrieve data and present it in various ways, depending upon the Execute method used. | ||
Constructors | CNXCommand | ||
Description: | Implement the default constructor here. The default constructor is used to create an empty CNXCommand object, which has an empty SQL statement, an empty CNXConnection object, and an empty CNXTransaction object. | ||
Parameters: | None | ||
CNXCommand | |||
Description: | This constructor creates a new CNXCommand object with the specified SQL statement. | ||
Parameters: | cmdText | ||
Type: | String | ||
Description: | SQL statement assigned to the CommandText property. | ||
CNXCommand | |||
Description: | This constructor creates a new CNXCommand object with the specified SQL statement and the specified connection object. | ||
Parameters: | cmdText | ||
Type: | String | ||
Description: | SQL statement assigned to the CommandText property. | ||
connection | |||
Type: | CNXConnection | ||
Description: | CNXConnection object assigned to the Connection property. | ||
CNXCommand | |||
Description: | This constructor creates a new CNXCommand object with the specified SQL statement, the specified CNXConnection object, and the specified CNXTransaction object. | ||
Parameters: | cmdText | ||
Type: | String | ||
Description: | SQL statement assigned to the CommandText property. | ||
connection | |||
Type: | CNXConnection | ||
Description: | CNXConnection object assigned to the Connection property. | ||
txn | |||
Type: | CNXTransaction | ||
Description: | CNXTransaction object assigned to the Transaction property. | ||
Properties | CommandText | ||
Return Type: | String | ||
Description: | The CommandText property gets/sets the SQL statement processed when an Execute method is called. | ||
CommandTimeout | |||
Return Type: | Int | ||
Description: | The CommandTimeout property is not supported at this time. Setting to non-zero value throws an exception. | ||
CommandType | |||
Return Type: | CommandType | ||
Description: | The CommandType property gets/sets the CommandType. | ||
Connection | |||
Return Type: | CNXConnection | ||
Description: | The Connection property gets/sets the CNXConnection object. | ||
Parameters | |||
Return Type: | CNXParameterCollection | ||
Description: | The Parameters property gets the CNXParameterCollection that contains the CNXParameter objects. | ||
Transaction | |||
Return Type: | IDbTransaction | ||
Description: | The Transaction property gets/sets the CNXTransaction object. | ||
UpdatedRowSource | |||
Return Type: | UpdateRowSource | ||
Description: | The UpdatedRowSource property specifies how results are applied to the row that is being updated. This property is not implemented and is provided for interface compatibility. | ||
Methods | Cancel | ||
Return Type: | Void | ||
Description: | The Cancel method is not supported at this time and throws an exception. New CNXParameter object | ||
Parameters: | None | ||
CreateParameter | |||
Return Type: | IDbDataParameter | ||
Description: | The CreateParameter method returns a newly created CNXParameter object. New CNXParameter object. | ||
Parameters: | None | ||
Dispose | |||
Return Type: | Void | ||
Description: | The Dispose method releases any resources used by the object. | ||
Parameters | disposing | ||
Type: | Bool | ||
Description: | Specified if managed resources should also be disposed (true). | ||
ExecuteNonQuery | |||
Return Type: | int | ||
Description: | The ExecuteReader method executes the Action query and returns the number of records affected. | ||
Parameters: | None | ||
ExecuteReader | |||
Return Type: | IDataReader | ||
Description: | The ExecuteReader method executes the SQL statement contained in the CommandText property and returns a CNXDataReader object that can be used to iterate through the results. | ||
Parameters: | None | ||
ExecuteReader | |||
Return Type: | IDataReader | ||
Description: | The ExecuteReader method executes the SQL statement contained in the CommandText property and returns a CNXDataReader object that can be used to iterate through the results. | ||
Parameters: | Behavior | ||
Type: | CommandBehavior | ||
Description: | The CommandBehavior specifies if the connection should be closed after the query is executed. | ||
ExecuteScalar | |||
Return Type: | Object | ||
Description: | The ExecuteScalar method executes the SQL statement contained in the CommandText property and returns the first column of the first row of the resulset. | ||
Parameters: | None | ||
Prepare | |||
Return Type: | Void | ||
Description: | The Prepare method is not implemented at this time and will not throw an exception. | ||
Parameters: | None |