I'm sure I've read posts on this subject before, or at least something similar, but what I am looking for is suggestions on how best to tackle the problem.

We have a speed issue here, which is being addressed by tweaking a lot of the SQL statements so that as much processing as possible is done server side, whihc in my opinion should have been done at the very start but there you are.

The problem I/we have is that some statements can take 10 minutes plus to execute successfully, and I need some way of relaying to the user where the program is at.

As an example, we have 20 departments. Normally the easiest way would be to process a department at a time and update a panel in a status bar with which department is being processed. This way the user, knowing there are 20, can best guess how long something is going to take to complete.

Ideally, I want to process all 20 departments in one SQL statement, rather than 20 separate ones, as there are obvious performance gains to be made, and also less network traffic.

Can anyone come up with a suggestion as to how I might portray to the user that at least the program is running, rather than just changing the mousepointer to an hourglass ?

As it stands, the PC pretty much hangs until the SQL has finished, which is really less than ideal.

Any constructive feedback as always much appreciated ....