How can i use Progressbar for loading data to DataGridView using DataTable

I have a datatable which have 3 columns and set this datatable to be datasouce of datagridview.
I want to add 100000 rows into this  table while
 table is adding , I want Progressbar to calculate and show the remaining
percentage.
How can i do this ?

I've seen this done 2 different ways.
You could either set the ProgressBar.Maximum to: 100, or  to QuantityToLoad. 
example:
Option Strict On
Option Explicit On
Option Infer Off
Public Class Form1
Dim QuantityToLoad As Integer = 100000
Dim increment As Double = 100 / QuantityToLoad
Private Sub btnExample1_Click(sender As Object, e As EventArgs) Handles btnExample1.Click
ProgressBar1.Value = 0
ProgressBar1.Maximum = 100
ProgressBar2.Value = 0
ProgressBar2.Maximum = QuantityToLoad
For i As Integer = 1 To QuantityToLoad
'Some code
'Some code
'Some code
'Done loading item
ProgressBar1.Value = CInt(i * increment)
ProgressBar2.Increment(1)
Label1.Text = ProgressBar1.Value.ToString & "% complete."
Label2.Text = CStr(Math.Round((ProgressBar2.Value / ProgressBar2.Maximum) * 100, 2)) & "% complete."
Application.DoEvents()
Next
MsgBox("done")
End Sub
End Class
“If you want something you've never had, you need to do something you've never done.”
Don't forget to mark
helpful posts and answers
! Answer an interesting question? Write a
new article
about it! My Articles
*This post does not reflect the opinion of Microsoft, or its employees.

Similar Messages

  • How to use sqlldr for loading data in Oracle 10g xe.

    I want to load data using SQL*LOADER in Oracle DB from a .csv file but it doesn't seems to be working can anyony please help me.I am not get getting how to use sqlldr.
    in CMD in giving this command
    sqlldr hr/hr control='c:/data/record.ctr'
    record.ctr>>load data
    infile 'c:\data\record.csv'
              into table record
    fields terminated by "," optionally enclosed by '"'          
    ( Name,uday, hemant )
    sql table in data base>>CREATE TABLE "RECORD"
    (     "NAME" VARCHAR2(50),
         "UDAY" VARCHAR2(50),
         "HEMANT" VARCHAR2(50)
    record.csv>>name,uday,hemant
    c1,45454,84894
    c2,489654,21322
    can you please tell me how can i get this simple example run.

    C:\>sqlldr scott/tiger
    control = data.ctl
    SQL*Loader: Release 10.1.0.2.0 - Production on Thu Sep 14 17:06:46 2006
    Copyright (c) 1982, 2004, Oracle.  All rights reserved.
    Commit point reached - logical record count 3
    SQL> conn scott/tiger
    Connected.
    SQL> create table data (col1 varchar2(40),col2 varchar2(40),col3 varchar2(40));
    Table created.
    SQL> select * from data;
    COL1                 COL2                 COL3
    name                 uday                 hemant
    c1                   45454                84894
    c2                   489654               21322
    SQL>
    data.csv
    name,uday,hemant
    c1,45454,84894
    c2,489654,21322data.ctl
    load data
    infile 'c:\data.csv'
    append
    into table data
    fields terminated by ','
    optionally enclosed by '"'
    (col1,col2,col3)i hope it will solve ur problem

  • How can I "profile" folio articles load time and memory use?

    Hi folks,
    I am beating my head against the wall since last week:
    How can I figure out a problematic article (one or more), that causes both Content Viewer and custom viewer (.IPA) to crash on load?
    The crash report states that "application took too long to start", in some cases it is "jettisoned".
    The whole layout has 150+ arcicles, each about 30 pages long in average, with the total size of 705 Mb. We have about 30...40 3D images there, lots of navto links, embedded video/ audio clips - I think we used every MSO type available for iOS viewer.
    All articles are of PDF type.
    No custom JavaScript code, no HTML tweaking - just a transition from relatively complex inDesign layout.
    At some point, while filling the folio with content, the Content Viewer started crashing on load.
    We rolled back and startred re-assembling the whole package, checking once 30...60 more articles were added.
    Our DTP guy was backing up intermediate results while adding articles, so I have several .IPA of the same layout, one with less than 30 articles, and several subsequent versions (60, 90 articles, etc). The smallest one works great even on 1st iPad - a bit slow (about 5 seconds to render a page when jumping between articles), but no crashes, no jerky pages, zooming and flipping is perfect.
    All bigger versions (30+ articles) crash on both iPad1 and iPad3.
    Adobe states there is no limitation in the number of articles and pages per article, but it seems to be a limit which we don't know. Or there is something in our design that causes crashes.
    WHAT TO DO???
    The idea to start from stratch again, making a backup before adding each article, uploading and testing is not good. It will take weeks, we don't have that much time.
    Can there be a "profiling tool" for DPS, similar to what programmers use when the code is unacceptably slow?
    Some switches to run the installed custom viewer app from command line, with verbose logging, debugging, whatever???
    Is there any way to know, what exactly on our side causes the problems?
    Need help ASAP.
    Regards
    Serge

    Mike, I basically have to do the same. The idea to use DPS for something else than glossy magazine or corporate catalog, is my brainchild, and losing hopes feels like euthanazing a pet, to say the least.
    With the only exception: I don't see DPS as an inferior product. Rather, it is a raw product, brought to the light before it is really ready, in order (as it is often, if not always, happens in hi-tech industry) to corner the territory before competitors catch up.
    As you could see in other threads, there are no books or training courses available yet, and I believe Adobe team is not quite sure what can and cannot be done with DPS. A part of the minefield is Apple iOS, that enforces certain limitations to ensure system stability. And I am sure, there is a lot of other factors in play that we are not aware of, and probably never will be.
    The point of saying what's been said is: there is a price to be paid for being on the bleeding edge of technology. This price, other than spending money for expensive equpment, other than investing time into learning and experimenting, is taking the risk of failure. The risk that it will not work out due to reasons beyond your control. So I don't think Adobe is much to blame here, they are playing the same game. Accept the rules or leave...
    Just my 5 cents...

  • How can the DFF created for a PO form be used in PO web based page.

    Hello,
    I have created a DFF on the PO form using the attribute2 of the PO_HEADERS table. How can I create a DFF on the web page based 'buyer work center' page. My final goal is to use DFF for both the web based pages and forms.
    Thanks for your help
    Raj

    hello Pradeep,
    Whats the difference b/w DFF and custom DFF ?
    I'll tell the steps what I did.
    1. Application Developer > Flex Field > Descriptive > Register
    Registered a DFF for PO_HEADERS_ALL table and used Attribute2.
    2. Application Developer > Flex Field > Descriptive > Segments
    So I used the DFF in the PO form. I want to see a DFF in the PO page also when the below navigation is used.
    Purchasing: >Buyer Work Center>Orders. Opens a PO page.
    Thanks for the help.
    Raj

  • How can we find tables for master data transactions

    hi
    could anybody tel.............
    when we create a customer the information is updated in structure RF02D
    some tables like kna1 are updated.
    how can we find these tables..?

    Hi Kalyan,
    This is how you can find any transparent table you want.
    1. Put your cursor in any of the  fields of the customer screen and hit <b>F1</b> on your keyboard. Next Click on the "<b>Technical Information</b>" icon. Under "<b>Field Data</b>", this would show you for example structure <b>RF02D</b> and field <b>KUNNR</b> (Customer Number), if your cursor was in the Customer Number field. Copy the field KUNNR.
    2. Next, open another session and execute transaction code <b>SE80</b>. On the Menu Bar, click "<b>Environment -> Repository Information System</b>". Open up the folder "<b>ABAP Dictionary -> Fields -> Double Click on Table Fields</b>". Paste your Customer Number field name (KUNNR) in the "<b>Field Name</b>" and Execute. This would show you all the transparent tables where the Customer number is stored.
    I hope the above helps.
    Do not forget to award the points please.
    Regards,
    Jacob

  • If my phone is stolen/lost how can i try to turn the data on by using the computer

    My phone got stolen last week and I want to see if I can track it. but I didn't have the " find my Iphone " app downloaded and my data was turned off. How can I download the app and turn my data on by using the I cloud  website?

    You don't need an app to track an iPhone from a computer. You can just open a web browser and go to https://www.icloud.com/#find
    But as it seems you are aware, the phone will need to be turned on and online. Following is a link to what is meant by online: iCloud: online
    More information: iCloud: Find My iPhone overview

  • Loading data in ASO using sql

    hi...
    is it possible to load data in an aso cube using sql....similar to what we can do fro a bso cube..
    in total how many ways are there for loading data in aso cube??

    Hi Srivastava,
    Load data between aso and bso are also the same. so, you can use sql to load your data into aso cube.
    Thanks
    Regards,
    VieN

  • Procedure for loading data through 0CO_OM_CCA_9 without taking downtime .

    Dear Friends ,
    We have already maintained the flow from 0CO_OM_CCA_9 to Infocube 0COOM_C02 . Now i enhanced two fields in the datasource which i want to load into the cube . The infocube already contains data from 2008 onwards . Now i know that for controlling datasources SAP ECC/R3 downtime is not needed . Requirement is to load the historical data again for the two enhanced fields also from 2008 onwards .
    Kindly let me know the steps for doing as the delta mechanism is already activated for this flow ?
    Thanks & Regards ,
    Ashutosh Singh

    Hi All,
    I am able to create this in client 100 but not in 120. I created this program by copying the source code from sap note and run in test mode in client 100 of development server. I am getting the message that "there is no inconsistency in table BWMO2_TIMEST".
    1. I am using client for loading data 120 not 100.
    Please let me know the further steps.
    Thanks,
    Harry

  • I cannot log in my game center using a same nickname after i updated my phone to ios 7. All my game data i was playing for months is lost. Seems when i try to put my nickname its already in used. How can i recover all my game data back?

    All my game data i was playing for months was lost. Seems when i trie to put my nickname its already in used. So i need to put a new nickname then it create a whole new acc for me. All my previous data was lost. How can i recover my all my data or use my old nickname? Pls help  

    kerryp123
    Yes, it is the same with me. I know a friend how upgraded to iso7 and lost all of his game center data. He tried singning in and re singning in but no change. Plus on to of all of this, apple is like have me and him to re-validate our itunes acount. Somthing weried is going on. So verified my itunes acount and it shows under settings that I am signed in, but when I go to  the app store on my iPhone and try downloading or even updating a app, it says "can not conect to itunes store" after singing in! AND I'M NOT SURE I AM GOING TO UPGRADE TO ISO7 YET UNTILL THEY FIX THIS BUG!!!! HELP!

  • What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?

    Hi All,
    I am new to TestStand. Still in the process of learning it.
    What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?
    Thanks in advance,
    LaVIEWan
    Solved!
    Go to Solution.

    Hi,
    Using the Parameters is the correct method to pass data into and out of a sub sequence. You assign your data to be passed into or out of a Sequence when you are in the Edit Sequence Call dialog and in the Sequence Parameter list.
    Regards
    Ray Farmer

  • I bought my iphone5 last Mar 1, 2013. However, it was stolen/lost last friday Jun 14.How can I locked it for them not to use or resell it?I'm not registered at ICLOUD. I am not expecting it to be returned. I just want it not to be used anymore by others..

    I bought my iphone5 last Mar 1, 2013. However, it was stolen/lost last friday Jun 14.How can I locked it for them not to use or resell it?I'm not registered at ICLOUD. I am not expecting it to be returned. I just want the unit to become useless already so that stolen/lost  Iphone or any kind of apple brand gadget will no longer be of interest by others to buy it from any thief or any person who will resell it in just a small amount.

    Sorry, but if you did not set up Find My iPhone, then unless your iPhone is set up with a company Microsoft Exchange server or other mobile device management system, there is no way to wipe the iPhone of its data, though if you had a screen lock in it, the thieves/finder will probably restore it and wipe the data anyway. There is no way to lock the iPhone permanently to prevent someone from using your iPhone, though you can report the loss to your cell carrier and they may be able to blacklist it from connecting to their network.
    Regards.

  • How can i add the dimensions and data loading into planning apllications?

    Now please let me know how can i add the dimensions and data loading into planning apllication without manuallly?

    you can use tools like ODI or DIM or HAL to load metadata & data into planning applications.
    The data load can be done at the Essbase end using rules file. But metadata changes should flow from planning to essbase through any of above mentioned tools and also there are many other way to achieve the same.
    - Krish

  • How can we display svg files in flex at runtime using FileReference? Actually we are trying to load

    how can we display svg files in flex at runtime using FileReference? Actually we are trying to load the svg file from the  local directory.

    This should give you the JRE version;
    System.out.println(System.getproperty("java.version"));
    and this should tell you where its running from;
    System.out.println(System.getProperty("java.home"));
    There are loads more system properties, check the JDK documentation for java.lang.System and look at the getProperties method which has a list.
    Stewart

  • Can I use LabVIEW to load data directly into system memory? The serial card I'm using isn't supported by NI nor does VISA recognize it. I'm using a Win32 function to read the data from the card and now I want it to go directly to system memory.

    Can I use LabVIEW to load data directly into system memory from a VI? The serial card I'm using isn't supported by NI nor does VISA recognize it. I'm using a Call Library function to read the data from the card and now I want it to go directly to system memory.
    The data is being received at 1Mbps.
    Thanks

    Two questions:
    One, if it's a serial card, then presumably it gives you more serial ports, like COM3, COM4, etc. If so, VISA would see the COM ports, and not the card directly. The drivers for the card should make it so that you see the extra serial ports from the OS. If you don't see the extra COM ports from VISA, then it sounds like the drivers for the card are not installed properly. Do the extra COM ports show up in Device Manager?
    Two, you said that you're using a Call Library function to get the data and you want to put it into system memory. Errr.... you just read the data and you have it in memory by definition. Are you saying you need a way to parse the data so it shows up on a graph or something?

  • How can I associate 2 appleids with one account or use a different Appleid for imessage as described in another post?

    How can I associate 2 appleids with one account or use a different Appleid for imessage as described in another post?
    I have rejoined the iPhone community, not with one iPhone but with two. My wife agreed to move from the unenlightened!
    I have set up both under my apple account and want to keep it that way. But I do not want iMessages going to both phones. I would like separate message queues but share all apps and other purches from the store.
    I have created a separate AppleID for her but under Settings>Message>Receive At (it currently says 2 addresses) > ... will not allow me to change the current eMail address and when I add hers (her appleid) it errors out. The only thing I can do in the Apple ID field is to manage my account and not change it to hers.
    How can I have 2 iPhones (and my iPad) on the same account but have separate identies?
    Thanks,
    LpGrumpy

    1. Yes. Restart with the Option key held down as needed.
    2. No, it won't be a problem.
    (83373)

Maybe you are looking for