Page 1 of 1

Async queries and data adpters

Posted: Mon 02 Oct 2006 12:50
by Shy_b
I was wondering if there's a way of quering the database in an asynchronous manner and get the result to my dataset without coding all the related code.

when i use the wizard I get a synchronous code and my application uses a threadpool thus filling up the threadpool with queries waiting for a reply ..

Thank you,
Shy.

Posted: Tue 03 Oct 2006 07:29
by Alexey
Please describe in detail what exactly you need or what is the problem. What asynchronicity do you expect? You need methods BeginFill, EndFill of DataAdapter?

Posted: Sat 21 Apr 2007 14:24
by Shy_b
Hi Alexey,

Sorry for the long delay, i recently got back to develop that module i've needed that async methods for.

what i needed was the the begin and end functions for the dataset generated, so every query submitted to the Database would be async (including update, delete and insert), i can do that using the command and conection but not via datasets.

Thanks,
Shy.

Posted: Thu 26 Apr 2007 11:23
by Alexey
Unfortunately, we do not have such functions.

Posted: Thu 26 Apr 2007 15:07
by Shy_b
do you plan to have these or any async functions in the future ?

Posted: Sat 28 Apr 2007 10:36
by Alexey
We will consider this possibility.

Posted: Sat 28 Apr 2007 19:10
by Shy_b
Thank you.

Posted: Mon 30 Apr 2007 15:26
by rbirnesser
a background worker component works excellent. You have to code very few lines. Just remember if you are using a data grid view and trying to fill the thread a sync to merge the results into the dataset that is bound to the data grid view.

http://forums.microsoft.com/MSDN/ShowPo ... 2&SiteID=1

take a look at the second to last post on the link above.

Posted: Mon 30 Apr 2007 17:19
by Shy_b
Thanks but I need this for a service application with no interface.
the problem is that timeout will not work and some queries just hang.

Shy.

Posted: Mon 30 Apr 2007 18:01
by rbirnesser
It should still work Import Systems.ComponenetModel then add the event handlers dowork and runworkercompleted manually.