473,657 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2831
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2776
by: JK | last post by:
In my win form, I'm trying to display a Crystal report with the data in my dataset only but, if I follow the steps in this msdn page: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/crystlmn/html/crtsksettingupanado.netreportinaviewer.asp it always displays all the data regardless of the Select statement I run. Here's my code: InitializeComponent(); //my code
5
14285
by: Amadelle | last post by:
Hi All and thanks in advance, I was wondering what is the best way of grouping data in a dataset. Like using a "Group By" clause in Sql statements. I was thinking of using XML but I don't even know how to do grouping in XML. I have a dataset table which i would like to supposedly run the following sql statement on: Select UserID from tblAccounts
2
4058
by: Jason (Kusanagihk) | last post by:
To all, I am writing a C# application; I've a DataGrid to show and edit data; then I tried to update the updated data by calling ADO_Adapter.update (ADO_DataSet, "TableName"); But it pop up a DBConcurrencyException! Anyone get ideas on how to properly use DataGrids and DataSets together ???
3
4002
by: Elena | last post by:
I need to extract data from a recordset. I have to find the identifier of the table and add 1 to it. In VB6, I used a recordset, as in the code below: 'get a new item number strsql = "Select * from Action where item_identifier = " & intActionID & " order by action_identifier" Set rsAction = CriticalItems.cn.Execute(strsql) If rsAction.RecordCount = 0 Then intActionIdentifier = 1
1
1076
by: Martin | last post by:
Hi, I've got a scenario where I have two different data sources, one is an SQL server and the other is a Foxpro DBF table. What I'm trying to do is take data from the SQL server and place it into the DBF table this is the code I have so far. '======= SQL Connection ====== Dim strConn As String = "user id=*******;password=*******;data source=***.***.***.***;persist security info=False;initial catalog=*******" Dim sqlCon As New...
4
3945
by: Khurram | last post by:
Hi, I understand in order to extract data from the tables in a Dataset and setting it to control, the following csharp syntax applies. textBox1.Text = northwindDataSet.Customers.ContactName; However I am creating a Dataset at runtime when query results from a WebService are returned as a Dataset. I know that it will contain only one table (Table1) and contain and number of fields (Field1, Field2, Field3). And Visual Studio will not...
2
3829
by: rrflore2 | last post by:
Ok. I'm writing and deleting to an xml file using a dataset. I have a function in my codebehind page that binds a listbox to the dataset that performs the writes/deletes. Everything seems to be working fine except, I cannot get the listbox to update after the xml file is written to. I've tried to rebind the listbox and a bunch of other things; nothing seems to work. I'm sure this is simple fix but, I cannot seem to figure it out. I...
3
4335
dj12345
by: dj12345 | last post by:
Hi, I have 2 Gridviews on my asp.net page. In this gridview i am showing list of links. I want to update these links dynamically after 5-10 seconds, without refreshing the page(without postbak) i want to fetch these link dynamically and want to bind it to Gridview.. I have little bit idea about this that. use the webservice to fetch record like we do it in Ajax AutoComplete. But how to fetch record dynamically and bind it to Gridview.. ...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7352
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2742
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.