I have made an application in VB that reads about 30000 records from several databases. These records are stored as objects in VB. The problem is that when I try to end the program, this takes several minutes. During this shutdown my harddrive is constantly being accessed. All references to objects are allways set to Nothing, and I have also tried to abruptly end the program using the End statement, but this only makes it worse.

If I kill the program in the Process viewer util the program stops immedately, also if the program is allready in the shutdown process.
If I try to end the program using the Windows task manager, the program first tries to shutdown nicely, then the task manager starts complaining that the program is not responding. I can then stop the program by clicking End task without waiting for the program to respond.

Is there any way to abruptly stop a program in VB? I then first close all database connections etc. and then want to kill the process as this is basically what I do using the process viewer.