Threading

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brad

    Threading

    I need to learn about threads and threading. I currently have a process
    that is pulling 10 to 12 thousand records from the AS400 and formatting the
    data then storing into a SQL server. This process is taking just over one
    hour and I would like a progress bar or something to show that it is
    actually working and I guess this would be done using threads.

    Can somebody give me a link to some good starter information on threads

    If it makes a difference, I am using VB .Net.

    Thanks,

    Brad


  • Carlos J. Quintero [.NET MVP]

    #2
    Re: Threading

    First of all, if you are using a single thread you can still provide a
    progress bar. I suppose that you have a loop pulling records from a
    recordset. If you know in advance the number of records, you just update the
    progress bar when there is a 1% of variation. You use the Refresh method or
    similar to repaint the progressbar, or maybe a
    System.Windows. Forms.Applicati on.DoEvents statement.

    Threads are used to make the UI more responsive and allow cancellation if
    the above is not enough. Here you have a tutorial:

    Safe, Simple Multithreading in Windows Forms, Part 1


    Safe, Simple Multithreading in Windows Forms, Part 2


    Safe, Simple Multithreading in Windows Forms, Part 3



    --

    Carlos J. Quintero

    MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
    You can code, design and document much faster.
    MZ-Tools has a single goal: To make your everyday programming life easier. As an add-in to several Integrated Development Environment (IDEs) from Microsoft, MZ-Tools adds new menus and toolbars to them that provide many new productivity features.




    "Brad" <ballison@ukcdo gs.com> escribió en el mensaje
    news:OM2qsOIBFH A.1084@tk2msftn gp13.phx.gbl...[color=blue]
    >I need to learn about threads and threading. I currently have a process
    >that is pulling 10 to 12 thousand records from the AS400 and formatting the
    >data then storing into a SQL server. This process is taking just over one
    >hour and I would like a progress bar or something to show that it is
    >actually working and I guess this would be done using threads.
    >
    > Can somebody give me a link to some good starter information on threads
    >
    > If it makes a difference, I am using VB .Net.
    >
    > Thanks,
    >
    > Brad
    >[/color]


    Comment

    Working...