DTS makes form lock

  • Thread starter Thread starter Marc Miller
  • Start date Start date
M

Marc Miller

I'm running an SQL Server DTS job class from a windows form. However, once
the DTS class call is made, the form is inaccessible or all the controls are
gone and
the form is blank until the DTS class process completes.

I'm using Application.DoEvents(), but no go. Does this need threading?

Thanks,
Marc Miller
 
Hi Marc,

Sounds like it. Long running tasks such as expensive database queries
or web service method calls should run in a different thread for better
user experience.

Start out by trying something like this: Put your DTS invoke code in a
method like RunDTS(). Lets say you have a button click event handler.
In that event handler, invoke the method like this:
this.BeginInvoke(new MethodInvoker(RunDTS));

I recommend you add a progress bar (Marquee style) to indicate to the
user that the application is doing work.

Was this helpful?

Kind regards,
Christer
 
Christer,

Thank you for your help. Sorry for the amount of time I took to get back to
you.

I tried the BeginInvoke method and I use an animated gif to indicate
processing.
However, the animated gif stops animation until the DTS task is completed.

Marc
 
Back
Top