dotConnect for DB2 Documentation
Devart.Common Namespace / DbDump Class / BeginRestore Method / BeginRestore(Stream,AsyncCallback,Object) Method
The System.IO.Stream object to read the script from.
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
State information that is passed on to the delegate.

In This Topic
BeginRestore(Stream,AsyncCallback,Object) Method
In This Topic
Starts an asynchronous invocation of a Restore(Stream) method with information for callback function.
Syntax
'Declaration
 
Public Overloads Function BeginRestore( _
   ByVal stream As Stream, _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
 

Parameters

stream
The System.IO.Stream object to read the script from.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.

Return Value

An System.IAsyncResult interface that represents the asynchronous operation started by calling this method.
Remarks

BeginRestore(Stream,AsyncCallback,Object) method enables you to perform a restore operation without having current thread blocked. In other words, your program can continue execution while the restore operation runs in background so you do not have to wait for it.

To start the restore operation, you have to call BeginRestore(Stream,AsyncCallback,Object) method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an System.IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the backup operation, call EndRestore. If at the moment you call this function the restore operation has not yet been finished, application stops and waits till the function returns.

See Also