'Declaration Public Overloads Function BeginExecuteReader() As IAsyncResult |
public IAsyncResult BeginExecuteReader() |
'Declaration Public Overloads Function BeginExecuteReader() As IAsyncResult |
public IAsyncResult BeginExecuteReader() |
BeginExecuteReader method enables you to execute a query on a server without having current thread blocked. In other words, your program can continue execution while the query runs on a database so you do not have to wait for it.
Refer to "Asynchronous Query Execution" article for detailed information.
To start running a query, you have to call BeginExecuteReader 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 accept query results, call EndExecuteReader. If at the moment you call this function the query execution has not yet been finished, application stops and waits till the function returns. Then you can treat a Devart.Common.DbDataReader in a common way.