2nd running MsAccess Fast removal (1 Viewer)

FuzMic

DataBase Tinker
Local time
Tomorrow, 02:56
Joined
Sep 13, 2006
Messages
719
Hi there

For some unknown reasons there is another instance of msAccess.03 running which is elusive from the Application tab of the Task Manager. This will be visible in the Processes tab of the same.

What can be the cause of this 2nd instance?

Is there codes i can use to clean all instances on ONE GOo?
 

GinaWhipp

AWF VIP
Local time
Today, 14:56
Joined
Jun 21, 2011
Messages
5,901
Sounds like you are not specifically closing a Recordset somewhere...
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 13:56
Joined
Feb 28, 2001
Messages
26,999
Can you be a LITTLE more descriptive, using more quantitative and less qualitative terms, with regard to "elusive" ?
 

FuzMic

DataBase Tinker
Local time
Tomorrow, 02:56
Joined
Sep 13, 2006
Messages
719
Closing recordset is already my constant lookout

Sent from my HTC_PN071 using Tapatalk
 

GinaWhipp

AWF VIP
Local time
Today, 14:56
Joined
Jun 21, 2011
Messages
5,901
But if there is an error your routine may stop prematurely leaving a Recordset open. Have you checked for that?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 13:56
Joined
Feb 28, 2001
Messages
26,999
When you are exiting the application, there are ways to know that a recordset is still open and you could assure closure in that case.

Code:
Dim rsT as DAO.Recordset

...

{when about to exit the app...}

    ON ERROR RESUME NEXT
    FOR EACH rsT in CurrentDB.Recordsets
      rsT.Close
    NEXT rsT

...

The idea is that if you at least close the open recordsets, the act of an Application.Quit will do the rest of the cleanup when all implied memory structures are reclaimed as your process memory gets handed back to the O/S for other processes to share.

If your database is ADO, I think there is a corresponding collection but haven't tried that.

This also makes sense if and only if your problem really IS a hanging recordset. A similar method might work using the collection Workspace.Connections to clean up all open connections, but you need to be more careful with this one since you need to be REALLY sure that you want to kill a particular connection. Be further warned that a connection ALSO has a .Recordsets collection because a connection object also supports the .OpenRecordset method. It probably isn't a good idea to close a connection while it still has open recordsets.
 

FuzMic

DataBase Tinker
Local time
Tomorrow, 02:56
Joined
Sep 13, 2006
Messages
719
😍 to my peers

Sent from my HTC_PN071 using Tapatalk
 

Users who are viewing this thread

Top Bottom