CommandText

This property specifies the SQL statement or stored procedure to run against the Oracle database or the XML data used to store changes to the Oracle database.

Declaration

// C#
public override string CommandText {get; set;}

Property Value

A string.

Implements

IDbCommand

Remarks

The default is an empty string.

When the CommandType property is set to StoredProcedure, the CommandText property is set to the name of the stored procedure. The command calls this stored procedure when an Execute method is called.

The effects of XmlCommandType values on CommandText are:

  • XmlCommandType = None.

    CommandType property determines the contents of CommandText.

  • XmlCommandType = Query.

    CommandText must be a SQL query. The SQL query should be a select statement. CommandType property is ignored.

  • XmlCommandType property is Insert, Update, or Delete.

    CommandText must be an XML document. CommandType property is ignored.