473,386 Members | 1,803 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,386 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 2949
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.