473,406 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

MS Access 2000 Automation, can't quit process... (originally posted to wrong group).

I create a new Access.Application instance. As soon as I refernce the property "References", I am unable to issue a truly successful quit on that instance. By that I mean the call to quit is fine but if you look in task manager, the instance is still running. Furthermore, if you opened a database using that instance, you will not be able to open it until you quit the entire application or until you kill that process. BTW, the process is killed automatically on successful exit of the application (but it doesn't get killed if you simply go out of scope). I am interested in whether or not this is a real bug, or if there is a service pack or if it affects other versions of Access. To replicate

Create a new Windows Form Application. Add a reference to the Microsoft Access 9.0 Object Library COM component (this will automatically add some other references). Add a button to your form. In the click event for that button do something like (VB.NET)
Dim o As Access.Applicatio
o = New Access.Applicatio
o.OpenCurrentDatabase("c:\somedb.mdb", False
Dim x as Integer = o.References.Coun
o.CloseCurrentDatabase(
o.Qui

Set a breakpoint on the End Sub line. Open task manager and you should see an instance of MSACCESS.EXE still running
Let the program get out of the Sub (exit that scope) and you will see that the instance is still running. Exit the application normally (no errors, don't kill the application) and you will see that the OS properly kills the instance with the application

Run this again but take out the line: "Dim x as Integer = o.References.Count" and you will see that at the end of the sub, the instance is not there. I have a bunch of code like this and no other lines are causing this to happen, i.e. if I take out the few lines of code that reference "References", all instances of MSACCESS.EXE exit properly

Nov 22 '05 #1
1 2950
On Thu, 26 Feb 2004 11:16:05 -0800, David Conorozzo <da**@daveandmaureen.com> wrote:

¤ I create a new Access.Application instance. As soon as I refernce the property "References", I am unable to issue a truly successful quit on that instance. By that I mean the call to quit is fine but if you look in task manager, the instance is still running. Furthermore, if you opened a database using that instance, you will not be able to open it until you quit the entire application or until you kill that process. BTW, the process is killed automatically on successful exit of the application (but it doesn't get killed if you simply go out of scope). I am interested in whether or not this is a real bug, or if there is a service pack or if it affects other versions of Access. To replicate:
¤
¤ Create a new Windows Form Application. Add a reference to the Microsoft Access 9.0 Object Library COM component (this will automatically add some other references). Add a button to your form. In the click event for that button do something like (VB.NET):
¤ Dim o As Access.Application
¤ o = New Access.Application
¤ o.OpenCurrentDatabase("c:\somedb.mdb", False)
¤ Dim x as Integer = o.References.Count
¤ o.CloseCurrentDatabase()
¤ o.Quit
¤
¤ Set a breakpoint on the End Sub line. Open task manager and you should see an instance of MSACCESS.EXE still running.
¤ Let the program get out of the Sub (exit that scope) and you will see that the instance is still running. Exit the application normally (no errors, don't kill the application) and you will see that the OS properly kills the instance with the application.
¤
¤ Run this again but take out the line: "Dim x as Integer = o.References.Count" and you will see that at the end of the sub, the instance is not there. I have a bunch of code like this and no other lines are causing this to happen, i.e. if I take out the few lines of code that reference "References", all instances of MSACCESS.EXE exit properly.

See the following:

PRB: Office Application Does Not Quit After Automation from Visual Studio .NET Client
http://support.microsoft.com/default...&Product=vbNET
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David Conorozzo | last post by:
I create a new Access.Application instance. As soon as I refernce the property "References", I am unable to issue a truly successful quit on that instance. By that I mean the call to quit is fine...
11
by: Mr. Smith | last post by:
Hello all, My code can successfully open, write to, format and save several worksheets in a workbook then save it by a given name, close and quit excel. My problem is that if I try and do it...
4
by: Otis Hunter | last post by:
I have been given an Access Database which contains a table that has an OLE object field that contains a Word document. That table contains hundreds of records. I would like to find out how I can...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
7
by: taylor.bryant | last post by:
I am running: Win XP SP2 Excel 2002, Access 2002 (Office XP SP3) Using Visual Basic (not VB.NET) At one point (prior to XP SP2?!? - I can't pin it down), this did not happen and I was easily...
2
by: Andrew Cranwell | last post by:
Hi, Please redirect me if I am in the wrong group for this question... this is my first post to this group, so I hope it is clear! I am working on an automation project in VB.NET and have to...
28
by: Gil | last post by:
can i have a client pc trigger access.exe to open on the server side pc? i want to have the server run special functions and return the output to the clients without having the clients run the...
17
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting...
5
by: ruomingxu via AccessMonster.com | last post by:
I am new in this area. I want to use values in a Access database and pass them to a word document. I tried this test code in a form of the Access database but it didn't work (temp.doc is a word...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.