?
Solved

VS Display Record Counter

Posted on 2012-08-27
1
Medium Priority
?
312 Views
Last Modified: 2012-08-31
Using VS C# is there a way to display a record counter as you read through a dataset and perform operations? I do not want to get as involved as using backgroundworker. I just simply want to display a record counter as processes occur in the background. Any sample code would be appreciated.
0
Comment
Question by:rwheeler23
1 Comment
 
LVL 45

Accepted Solution

by:
AndyAinscow earned 2000 total points
ID: 38340621
>>Using VS C# is there a way to display a record counter as you read through a dataset and perform operations?


you mean something like the following where lbl is a label on your form.
int i = 1;
foreach(record in rs)
{
i++;
lbl.Text = i.ToString();
DoEvents();  //allow message loop to run, else lbl never appears to update
DoSomething();
}
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question