• Topic
  • Discussion
  • UdaWikiWeb.OPLCommand(Last) -- Owiki? , 2016-08-19 15:00:38 Edit owiki 2016-08-19 15:00:38

    OPLCommand

    Represents an SQL statement or stored procedure to execute against a database.

    public class OPLCommand : Component, IDbCommand, ICloneable
    

    Constructors

    public OPLCommand ();
    

    Initializes a new instance of the OPLCommand class.

    public OPLCommand (string cmdText);
    


    Initializes a new instance of the OPLCommand class with the text of the query.

    public OPLCommand (string cmdText, OPLConnection connection);
    


    Initializes a new instance of the OPLCommand class with the text of the query and an OPLConnection object.

    public OPLCommand (string cmdText, OPLConnection connection,OPLTransaction txn);
    


    Initializes a new instance of the OPLCommand class with the text of the query, an OPLConnection object and an OPLTransaction object.

    Properties

    PassThrough

    public bool PassThrough {get; set;}
    


    Allows the command text to be passed to the data source without being parsed by the Generic Provider.

    Remarks

    The PassThrough 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:

    • Some of the metadata returned by OPLDataReader. GetSchemaTable may not be accurate, specifically the metadata resultset columns IsKeyColumn, BaseSchemaName, BaseCatalogName, BaseTableName.
    • The command behavior setting KeyInfo will not append missing key columns to the end of a select list.
    • OPLCommandBuilder may not work, depending on the select statement used.

    Referenced by...