Application exception on close in IDE using MSDAORA.1

When using the MS provided Oracle provider MSDAORA.1 and exiting my
application I get an access violation when closing down the application
within the IDE. It does not seem to occur when not in the IDE. But this does
not necessarily mean it is not occuring, only that it is not being reported.
Does anyone know why this is ocurring and how to stop it?