none
Asynchronous Execution of ADO.NET methods using ODBC driver RRS feed

  • Question

  • I want to execute some ADO.NET commands asynchronously using ODBC driver. I think for Sqlcommand we have something like "BeginExecuteNonQuery", which initiates the async execution of sql statements.Then we can poll the IAsynResult.IsCompleted property to determine when the asynchronous operation has completed.

    I would like to know whether a similar property exists for ODBCCommand also.

    Wednesday, June 23, 2010 5:38 AM

Answers

  • By default .NET Managed Provider for ODBC does not provide any mechanism to execute command asynchronously. I believe this is because it's generic provider and not all ODBC data sources would have this functionality. What you could try to do is to provide multithreaded solution inside of your code, so the execution does not block main thread.
    Val Mazur (MVP) http://www.xporttools.net
    Wednesday, June 23, 2010 10:35 AM
    Moderator

All replies

  • By default .NET Managed Provider for ODBC does not provide any mechanism to execute command asynchronously. I believe this is because it's generic provider and not all ODBC data sources would have this functionality. What you could try to do is to provide multithreaded solution inside of your code, so the execution does not block main thread.
    Val Mazur (MVP) http://www.xporttools.net
    Wednesday, June 23, 2010 10:35 AM
    Moderator
  • Hi Val,

     

    Thanks for sharing your views. I was able to implement asynchronous odbc database operations via multithreading.

    Thursday, July 1, 2010 4:45 PM