<docbook><section><title>OPLCommand</title><bridgehead class="http://www.w3.org/1999/xhtml:h3">OPLCommand</bridgehead>
<para>Represents an SQL statement or stored procedure to execute against a database.</para><programlisting>public class OPLCommand : Component, IDbCommand, ICloneable
</programlisting><para> </para><bridgehead class="http://www.w3.org/1999/xhtml:h4">Constructors</bridgehead>
<programlisting>public OPLCommand ();
</programlisting><para>Initializes a new instance of the OPLCommand class.</para><programlisting>public OPLCommand (string cmdText);
</programlisting><para> Initializes a new instance of the OPLCommand class with the text of the query.</para><programlisting>public OPLCommand (string cmdText, OPLConnection connection);
</programlisting><para> Initializes a new instance of the OPLCommand class with the text of the query and an OPLConnection object.</para><programlisting>public OPLCommand (string cmdText, OPLConnection connection,OPLTransaction txn);
</programlisting><para> Initializes a new instance of the OPLCommand class with the text of the query, an OPLConnection object and an OPLTransaction object.</para><bridgehead class="http://www.w3.org/1999/xhtml:h4">Properties</bridgehead>
<para><emphasis>PassThrough</emphasis></para><programlisting>public bool PassThrough {get; set;}
</programlisting><para> Allows the command text to be passed to the data source without being parsed by the Generic Provider.</para><para><emphasis>Remarks</emphasis></para><para>The <span style="color: red">
      UNKNOWN tag:
      http://www.w3.org/1999/xhtml:noPassThrough property defaults to false.
 When pass-through is disabled, the Generic Provider parses command text associated with the OPLCommand and queries the data source for additional metadata on tables referenced in a select statement.
 The command parser in the Generic Provider is limited to the SQL grammar defined by ODBC.
 If you wish to pass native SQL to the data source you should enable pass-through; however this will have the following side-effects:</span></para><itemizedlist mark="bullet" spacing="compact"><listitem> Some of the metadata returned by <ulink url="OPLDataReader">OPLDataReader</ulink>.
 <ulink url="GetSchemaTable">GetSchemaTable</ulink> may not be accurate, specifically the metadata resultset columns <ulink url="IsKeyColumn">IsKeyColumn</ulink>, <ulink url="BaseSchemaName">BaseSchemaName</ulink>, <ulink url="BaseCatalogName">BaseCatalogName</ulink>, <ulink url="BaseTableName">BaseTableName</ulink>.
</listitem>
<listitem> The command behavior setting <ulink url="CommandBehaviorKeyInfo">KeyInfo</ulink> will not append missing key columns to the end of a select list.
</listitem>
<listitem> <ulink url="OPLCommandBuilder">OPLCommandBuilder</ulink> may not work, depending on the select statement used.
</listitem>
</itemizedlist></section></docbook>