I need help.....
Hi everybody,
I have this problem where when I instantiate an interop COM object I can't destroy it until my program exits....In this case the COM object is an instance of the Access.Application object (Access 97) as found in the Microsoft Access 8.0 Object Library....here's what i'm doing. This problem is that... ....doesn't close the access application window. it remains open until I close my app. That's not cool. I need it to close when I'm done with it. Any suggestions are greatly appreciated. Thanks a lot, Andeezle
Imports System.IO
Imports System.Runtime.InteropServices
PublicClass Access97Routines
PublicSharedSub RepairCorruptDatabase(ByRef corruptDBAs FileInfo,ByVal destinationFileNameAsString)
Dim accessAppAsNew Access.Application 'we're talking about access 97
accessApp.DBEngine.CompactDatabase(corruptDB.FullName, destinationFileName)
accessApp.Quit()
Marshal.ReleaseComObject(accessApp)
accessApp =Nothing
EndSub
EndClass
accessApp.Quit()
Marshal.ReleaseComObject(accessApp)
accessApp =Nothing

