Hi

I've got something odd going on which I hope will make sense to someone because at the moment it's making precisely no sense to me whatsoever.

I've built a Winforms application which reads the contents of a CSV file in, transfers those contents into a database and then proceeds to run a series of stored procedures against the full dataset.

The form that the import is launched from contains a number of controls designed to provide feedback to the user so that s/he can see how the import is coming along. When the user clicks the button to begin the import, the event behind that button launches a subroutine which is held in a dedicated class file.

The signature for that subroutine contains 17 separate elements, most of which correspond to controls on the main form. One of those elements is a Progress Bar which (perhaps obviously) increments as each row of data is read in from the incoming file. As each row is read in (using a StreamReader object), the information found is passed to an object. If the various elements in the row are as expected, they are passed to a stored procedure for insertion into the back-end database.

Here's the thing that's stumped me: when I run the application on my local machine (i.e. my development environment), everything proceeds without a hitch - everything is updated as it should be and the system is providing plenty of feedback to me. However when I deploy the application (we use Click-Once here), the application appears to become unresponsive during the import. There's no reason given for the lack of responsiveness and it's never at the same point in the file. Also, the application IS still working but my concern is that when I give it to my end-users to play with, they'll panic when they see the application reporting itself as not responding and will therefore crash out of it.

I've got a number of timers in use in other places in the application but I've disabled all of those in case they were running interference.

Something to be aware of: because of ongoing issues I've had with multithreading, I've got everything running on the same thread. If this isn't a good idea then that's my bad, but it still confuses me that the application runs properly when in development mode, but seems very flaky when deployed to a live environment.

If I helps, my development environment is 8.1 64-bit edition, with the application targetted to an x86 environment since our company is running both. I've also tried restarting my computer in case there was something hogging memory.

Hopefully someone can help me here....

TIA