473,405 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Need to display file processing status

My VB.Net app reads an Excel file, processes it one row at a time, and when
processing is complete writes the row to a database. The typical file will
have several thousand rows and may take a couple minutes to process. I would
like to display a running count of the number of rows processed. It is easy
enough to keep a counter and set the value of a textbox to the count. I
expected a high-speed odometer effect, with perhaps only the hundreds column
on up changing slowling enough to be readable, but instead the screen
"freezes" until processing is complete, at which point it shows the correct
count for total records processed. Is there a good way to show status while
processing is underway?

Much obliged.
Nov 20 '05 #1
5 3105
If its a windows project then you can write the record number to a tet
field, if its a console project then you can display this on the console.

Regards OHM
Geoff Pennington wrote:
My VB.Net app reads an Excel file, processes it one row at a time,
and when processing is complete writes the row to a database. The
typical file will have several thousand rows and may take a couple
minutes to process. I would like to display a running count of the
number of rows processed. It is easy enough to keep a counter and set
the value of a textbox to the count. I expected a high-speed odometer
effect, with perhaps only the hundreds column on up changing slowling
enough to be readable, but instead the screen "freezes" until
processing is complete, at which point it shows the correct count for
total records processed. Is there a good way to show status while
processing is underway?

Much obliged.

Nov 20 '05 #2
Sorry, there I go again not reading your post properly

Stick this in your loop, it should stop it freezing

System.Windows.Forms.Application.DoEvents()
OHM

One Handed Man wrote:
If its a windows project then you can write the record number to a tet
field, if its a console project then you can display this on the
console.

Regards OHM
Geoff Pennington wrote:
My VB.Net app reads an Excel file, processes it one row at a time,
and when processing is complete writes the row to a database. The
typical file will have several thousand rows and may take a couple
minutes to process. I would like to display a running count of the
number of rows processed. It is easy enough to keep a counter and set
the value of a textbox to the count. I expected a high-speed odometer
effect, with perhaps only the hundreds column on up changing slowling
enough to be readable, but instead the screen "freezes" until
processing is complete, at which point it shows the correct count for
total records processed. Is there a good way to show status while
processing is underway?

Much obliged.

Nov 20 '05 #3
Run the Excel file processing in a separate thread. Raise an event when you
want to update the textbox, and move the code that updates the textbox back
into the main form. Use the InvokeRequired and Invoke methods of the TextBox
control to run the UI update on the UI thread rather than the thread
processing the Excel file. You can find more information here:

http://www.devx.com/dotnet/Article/11358

"Geoff Pennington" <pe*********@stic2.com.NO!SPAM!> wrote in message
news:OH**************@TK2MSFTNGP09.phx.gbl...
My VB.Net app reads an Excel file, processes it one row at a time, and when processing is complete writes the row to a database. The typical file will
have several thousand rows and may take a couple minutes to process. I would like to display a running count of the number of rows processed. It is easy enough to keep a counter and set the value of a textbox to the count. I
expected a high-speed odometer effect, with perhaps only the hundreds column on up changing slowling enough to be readable, but instead the screen
"freezes" until processing is complete, at which point it shows the correct count for total records processed. Is there a good way to show status while processing is underway?

Much obliged.

Nov 20 '05 #4
"Geoff Pennington" <pe*********@stic2.com.NO!SPAM!> schrieb
My VB.Net app reads an Excel file, processes it one row at a time,
and when processing is complete writes the row to a database. The
typical file will have several thousand rows and may take a couple
minutes to process. I would like to display a running count of the
number of rows processed. It is easy enough to keep a counter and set
the value of a textbox to the count. I expected a high-speed odometer
effect, with perhaps only the hundreds column on up changing slowling
enough to be readable, but instead the screen "freezes" until
processing is complete, at which point it shows the correct count for
total records processed. Is there a good way to show status while
processing is underway?

Much obliged.


Call the refresh method of the control(s) to be updated. Attention: Using
WinXP, refresh is ignored after a couple of seconds.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5
Have you tried "Repaint" after the counter is incremented?
Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bob | last post by:
Below is sample code that illustrates what I'm trying to do. For sake of brevity I didn't include the properties of buildBtn that determine what data to request. The problem is I never see...
3
by: John Dalberg | last post by:
Hi I have a form that opens a new window for the results. Because the results might take a few seconds due to server processing, I would like to display a message "please wait" in the new...
16
by: pamelafluente | last post by:
I am still working with no success on that client/server problem. I need your help. I will submit simplified versions of my problem so we can see clearly what is going on. My model: A client...
2
by: Velhari | last post by:
Hi all, I developed the following codes to implement the concept of Multiple file Uploading Process. Actually my goal in this implementation is to uploads the files onto the server and i have...
6
by: homevista | last post by:
PART III: Putting things together In part I we examined the modem to verify that it supported voice. If so, we took a note about the voice data format that we would use. In the second part, we...
1
by: zeuscc | last post by:
I'm doing my final year project which is web-based fax server. I'm using the faxcomexlib library that inside the visual studio 2005 to do the fax function. I had done the send fax part. But now i...
9
by: tomhawkins1 | last post by:
Hi I currently have a site where users can upload files. These files can be doc, wmv, jpeg, xls, dwf, dwf and dwg. These files are uploaded to /home/**user**/uploads and not /home/...
9
by: tshad | last post by:
I have a Windows App that is doing some work and then writing a "Now Processing..." line to the status line of the window as well as the Textbox on the form. But the problem is that the work is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.