473,597 Members | 2,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

I create a new Access.Applicat ion 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.Applicat io
o = New Access.Applicat io
o.OpenCurrentDa tabase("c:\some db.mdb", False
Dim x as Integer = o.References.Co un
o.CloseCurrentD atabase(
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.Co unt" 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 2959
On Thu, 26 Feb 2004 11:16:05 -0800, David Conorozzo <da**@daveandma ureen.com> wrote:

¤ I create a new Access.Applicat ion 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.Applicat ion
¤ o = New Access.Applicat ion
¤ o.OpenCurrentDa tabase("c:\some db.mdb", False)
¤ Dim x as Integer = o.References.Co unt
¤ o.CloseCurrentD atabase()
¤ 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.Co unt" 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******@amerit ech.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
651
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 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...
11
4041
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 again, Excel hangs. OR if I open Excel again (say from a desktop icon) before I close Access, Excel hangs. (this has happened for both 97 & 2000 for me) I of course thought that I mustn't be unloading a variable properly.
4
15820
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 write a VB script, to be executed either within Access or executed at the CMD prompt, which will loop through all the records and open the document object and save it to a Word document that I can access from Windows Explorer. An additional info...
7
8842
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 want my users to be able to select a report, click on a command button on a form, which will then automatically create the report as a pdf file and save it to the user's machine. I am using Adobe Acrobat (5.0 I think) and have Adobe Distiller as a
11
6579
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 where the job is running, the job runs sucessfully, PDF files got generated, everything is good. If I scheduled the job to run at the time that I am not logged into the server, Access is not able to print to the printer. The error is pretty...
7
5333
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 able to destroy instances of excel (with the exact same code). I have read many, many posts, and they seem to get bogged down in specifics. So I cribbed this program from the automation help file, simplified it further, so hopefully someone can
2
3673
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 interact with Word 2000 SP-3 to find and replace text within a word document. Unfortunately, development (not created by me!) occured with Word 2000 SR-1 and on ugrading the references and version to SP-3, some of the code inexplicably stopped...
28
4827
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 functions itself.
17
4400
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 there, but is there a way they can find out if that application was put there from a CD or email or created at work? Hint: It's not on a client/server database, just native jet database mdb created on Access 2003 (default 2000)...
5
6507
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 doc already stored in C: drive): Dim oX As Object Set oX = CreateObject("C:\temp.doc") oX.editreplace "<<FirstName>>", "Richard", 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0 oX.Application.Visible = True Set oX = Nothing
0
7965
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7885
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8258
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5847
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3881
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3923
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2399
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1231
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.