Active Query Builder 2 .NET Edition reference
ExecSQL Event

Invoked when the Event Metadata Provider is requested to execute the SQL statement.
Public Event ExecSQL As ExecSQLEventHandler
Dim instance As EventMetadataProvider
Dim handler As ExecSQLEventHandler
AddHandler instance.ExecSQL, handler
public event ExecSQLEventHandler ExecSQL
public: __event ExecSQLEventHandler* ExecSQL
The metadataProvider parameter refers to the metadata provider invoked the event. The sql parameter contains the query to be executed. The schemaOnly flag indicates that there's no need for data retrieval for this query. Return the IDataReader interface through the dataReader parameter.
private void EventMetadataProvider_ExecSQL(BaseMetadataProvider metadataProvider, string sql, bool schemaOnly, out IDataReader dataReader)
    dataReader = null;
    if (dbConnection != null)
        IDbCommand command = dbConnection.CreateCommand();
        command.CommandText = sql;
        dataReader = command.ExecuteReader();
See Also


EventMetadataProvider Class
EventMetadataProvider Members



© Copyright 2005-2012 ActiveDBSoft. All rights reserved.

Send Feedback