Represents a command to execute queries.

Methods

Name

Description

DataParameter CreateParameter(string name, DbType type, object value)

Adds a parameter to the command with a given type and value. The parameter value is modified to a compatible database value.

DataParameter CreateParameter(string name)

Adds a parameter to the command. The parameter value is modified to a compatible database value.

void Dispose()

Frees the resources used by this object.

int ExecuteNonQuery()

Executes the command and returns the number of rows affected.

IDataReader ExecuteReader()

Executes the command text returning the resulting System.Data.IDataReader.

object ExecuteScalar()

Executes the query, and returns the first column of the first row in the resultset returned by the query. Extra columns or rows are ignored.

Connection GetConnection()

Returns the database connection associated to this command.

IDbCommand GetDriverCommand()

Returns the native command object used by the stack in which the application is running.

DataParameter GetParameter(string columnName)

Gets the parameter with the specified name.

Members

Name

Description

string CommandText

Gets or sets the SQL statements to execute.

int CommandTimeout

Gets or sets the command execution timeout.

Methods

Name

Description

DataParameter createParameter(String name, int type, Object value)

Adds a parameter to the command with a given type and value. The parameter value is modified to a compatible database value.

DataParameter CreateParameter(String name)

Adds a parameter to the command. The parameter value is modified to a compatible database value.

void dispose()

Frees the resources used by this object.

int executeNonQuery()

Executes the command and returns the number of rows affected.

OSResultSet executeReader()

Executes the command text returning the resulting outsystems.hubedition.util.OSResultSet.

Object executeScalar()

Executes the query, and returns the first column of the first row in the resultset returned by the query. Extra columns or rows are ignored.

String getCommandText()

Gets the SQL statements to execute.

int getCommandTimeout()

Gets the command execution timeout.

Connection getConnection()

Returns the database connection associated to this command.

ADOCommand getDriverCommand()

Returns the native command object used by the stack in which the application is running.

DataParameter getParameter(String columnName)

Gets the parameter with the specified name.

void setCommandText()

Sets the SQL statements to execute.

void setCommandTimeout()

Sets the command execution timeout.

See Also

Overview of RuntimePublic.Db API | About APIs