dotConnect for SQLite Documentation
Devart.Data.SQLite Namespace / SQLiteConnection Class / RegisterProgressHandler Method / RegisterProgressHandler(SQLiteProgressCallback) Method
A handler to register.

On this page
    RegisterProgressHandler(SQLiteProgressCallback) Method
    On this page
    Registers a handler to be invoked each SQLite virtual machine instruction during long running calls to a database.
    Syntax
    'Declaration
     
    Public Overloads Sub RegisterProgressHandler( _
       ByVal handler As SQLiteProgressCallback _
    ) 
    public void RegisterProgressHandler( 
       SQLiteProgressCallback handler
    )

    Parameters

    handler
    A handler to register.
    Remarks

    If the registered progress handler returns non-zero, the operation is interrupted.

    If the progress handler throws an exception, the operation is interrupted, and the SQLiteException that is thrown has the SQLiteErrorCode.Interrupt error code and contains the exception from the handler in the InnerException property.

    When the connection is closed, including when it returns to the connection pool, the progress handler is unregistered, so register it again after you open the connection.

    The handler must not do anything that will modify the connection it is registered in. This includes SQL statement preparation and execution, data retrieval, and so on.

    You can't register more than one progress handler. When you register a new one, the previous one is unregistered.

    See Also