468,537 Members | 1,949 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,537 developers. It's quick & easy.

fetching data asynchronously using ado.net dataset

Hi,

I am trying to get asynchronous fetching of data from sql server database. I
would like to show the progress of fetching records in GUI. Is there any
simple/complex steps for the same in C# using ado.net. Please help me. Have
good day. Thanks for your help in advance.
Nov 17 '05 #1
1 2636
Hi
there is no simple way to do that , what you can do however is to use
DataReader Object and increment your progress bar one step with each record
reader .
DataReader however is a steam so you will not know the count of the rows
before hand so what you need to do it to create two queries for each query
you want to execute . One return the number of rows ( and you get that one
so you know how many steps would be in your progress bar ). the second one
is the actual query you want to execute , then get its result in a reader
and increment your progress bar by one step with each row read.
hope this helps
Mohamed M .Mahfouz
Developer Support Engineer
ITWorx on behalf of Microsoft EMEA GTSC

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Amadelle | last post: by
2 posts views Thread by Jason (Kusanagihk) | last post: by
3 posts views Thread by Elena | last post: by
1 post views Thread by Martin | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.