Using the link that I provided you will be able to see how to do that. For example open the database connection, run query in assyns. mode. Now you will have to add handler so that if the query completes runs some specific code.
This way you have the possibility to cancel the query.
More explenation in :
http://www.devx.com/dotnet/Article/22358/0/page/1