The is (normally) only one thread processing the message loop in winforms,
commonly named the "ui thread". This will process each subscriber to teh
Closing event in turn, then close the form.
My guess would be the cleanup code is assigning the null to the dataset. You
could potentially try wrapping the dataset in a property. Then putting a
breakpoint in the set method and seeing if it is explicitly set to null. The
stackframe window would enable you to look up the stack at where in your code
it was done.

Signature
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
> Gday,
>
[quoted text clipped - 15 lines]
>
> PS forgive me if this is a primitive question.
Steven Spencer (Spinalogic) - 01 Feb 2007 00:43 GMT
Thats a bloody good idea smartarse.
;P
Sorry but you seriously just owned me, that is a fantastic idea for
debugging purposes!
> The is (normally) only one thread processing the message loop in winforms,
> commonly named the "ui thread". This will process each subscriber to teh
[quoted text clipped - 34 lines]
>>
>> PS forgive me if this is a primitive question.