dotConnect for Oracle Documentation
Devart.Common Namespace / DbDataTable Class / SuspendFill Method / SuspendFill(Boolean) Method
Determines whether to wait for break operation. If false, the method returns before the fill operation is actually suspended.
Example

In This Topic
    SuspendFill(Boolean) Method
    In This Topic
    Suspends asynchronous fill operation.
    Syntax
    'Declaration
     
    Public Overloads Sub SuspendFill( _
       ByVal wait As Boolean _
    ) 
    public void SuspendFill( 
       bool wait
    )

    Parameters

    wait
    Determines whether to wait for break operation. If false, the method returns before the fill operation is actually suspended.
    Remarks
    The fill operation can be resumed later with BeginFill and EndFill methods.
    Example
    The following example demonstrates how to use the SuspendFill(Boolean) method.
    static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection) {
    
      myDataTable.Connection = myConnection;
      myDataTable.SelectCommand = myConnection.CreateCommand();
      myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept";
    
      IAsyncResult aRes = myDataTable.BeginFill(null, null);
    
      Console.Write("Fetch in process");
    
      Thread.Sleep(100);
      myDataTable.SuspendFill(true);
      Console.Write("Fetch is stopped");
    
      myDataTable.EndFill(aRes);
      Console.Write("All records are fetched");
    }
    Private Shared Sub UseDataTable3(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection)
      myDataTable.Connection = myConnection
      myDataTable.SelectCommand = myConnection.CreateCommand
      myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept"
      Dim result1 As IAsyncResult = myDataTable.BeginFill(Nothing, Nothing)
      Console.Write("Fetch in process")
      Thread.Sleep(100)
      myDataTable.SuspendFill(True)
      Console.Write("Fetch is stopped")
      myDataTable.EndFill(result1)
      Console.Write("All records are fetched")
    End Sub
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also