Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSAccess.exe process stays open?

Status
Not open for further replies.

esmithbda

IS-IT--Management
Jun 10, 2003
304
US
I have an Access 2000 application that when closed (via the X on the window) will look like it exists.

But then when you go to open it again, or another Access application (double-click on the mdb file), it won't open.

If you look at the running processes in the Task Manager, it shows that MSAccess.exe is still running. If I kill that off and then try to open the files again, then they open fine.

Also, sometimes when closing out, if I have the VB editor open, it will stay open while the rest closes out (but no files will be open on it - just an empty shell of the IDE) - this seems to be a related issue.
 
The only time I've experienced this is when I was building and testing wizards and add-ins. When they errored out is when I was unable to get Access to exit. Are you using custom wizards/add-ins?
 
Is this a really big database? And are you using Compact on Close? (Tools | Options | General | Compact on Close)

If the database is compacting, it shows up in the Task Mangler as "running", and I don't think you can open another database until the compacting is done.

Sounds suspiciously like what's happening to you.

Tranman

 
FancyPrarie:
I am not using any wizards and/or add-ins. But I am writing and testing a lot of code which creates database/recordset objects and if it crashes before they are explicitly closed and killed, then I could see maybe that being a similar issue?

Tranman:
I just checked and indeed that Compact on Close option was checked.
This application is a port of another application and during that process is corrupted itself (the error where it says it probably lost the net connection and you have to export out to text files and then create a new project and import in the files). After creating a new project after that - perhaps this setting was the default and therefore why this started happening but didn't happen before?

I will keep an on it over the next few days to see if this is what the cause was.
 
Access2K, I bet.

There is a Service Release or bulletin or something like that, which solves that stupid "lost net connection" problem. Something to do with having the wrong version of a dll.

I can't lay my hands on the fix right now because my email archive is playing hard to get, but if you go to Microsoft.com and search for the error message, the fix is easy to find, and solved a lot of problems for me. (Had a customer that, every time I tried to import any object into a database on one particular machine, the DB got corrupted and we ended up recovering from backup.)

Good luck,
Tranman
 
Tranman, yes that is the one and I have already fixed it. Then after the fix, this "Access not fully closing" thing started happening.
What is weird and I still don't get is that Microsoft states that it is an issue with having a specific DLL version and then says that the fix is to put on a service pack which gives you a newer DLL.

But I checked and I already had that newer DLL and nowhere did I have the one they referred to.

But yeah, I still put on the service pack and that is where I am at now.

After all of that was when the Access staying open in Task Manager started - but like I said, I think that is related to the "fix" of having to export out all of the old corrupted files and then import then into a new project - the new project defaulted to have that "Compact on Close" checked and that is probably what is causing this (I hope).
 
Well, I thought it was going to be that Compact On Close issue, even though this is a small database (the actual database is a SQL Server that it connects to over a DSN-less connection string that it generates on the fly - the local database is just the application which hits stored procedures on that SQL Server and then generates reports based on the data which comes back). It runs about 9MB if it doesn't Compact on Close and about 3-5MB if it does compact.

I turned that off and didn't have the problem for a few days, so I figured that must be it.

But now I am seeing that the problem is back again.

The problem appears to be related to when I am debugging and the code crashes and/or gets stopped before all of the objects are closed and/or set to nothing.
I am going to try to change the code so that on error it jumps to a section and closes all local objects and sets them to nothing and see if that helps.

 
I always make sure to close and set to nothing any objects that I create, especially in this case ones relating to the database and recordsets which are connecting to a server on our intranet.

But what I missed was in rare cases of recordset failures I would throw an error message and close *nearly all* of the open objects - but I wasn't closing all of them.

I went through and made sure that every object in the new code I had added would always get closed and set to nothing, no matter what happened (barring a crash of the program, which is a larger worry than it hanging anyway).

After banging on it now for about an hour, it appears to have resolved the issue I was having.

 
esmithbda,
Thank you for posting back and letting us know.
Tranman

"Adam was not alone in the Garden of Eden, however,...much is due to Eve, the first woman, and Satan, the first consultant."
Mark Twain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top