Hi Steve,
I hadn't tried these, but when I did > $obj = Win32::OLE->new('Access.Application',{$_[0]->Quit();}) I got syntax errors, like this: syntax error at somescript.pl line nnn, near ";}" The same error appeared whether I used either the Quit or the Exit methods. This is part of a much larger script, of course, and I just snipped out the offending part to post. But prior to posting, I had tried the following: $obj = Win32::OLE->new('Access.Application',sub {$_[0]->Quit();}) ...based on some old Excel control code I was using. However, this construct produces the following error: Win32::OLE(0.1501) error 0x80010108: "The object invoked has disconnected from its clients" in METHOD/PROPERTYGET "Quit" at somescript.pl line nnn I recall from my Excel days, using similar code, that I was experiencing the same problem that Jeffrey reported. The more times I called Excel, even using the Quit method in both the creation of the object and at the end of processing the object, the more Excel phantom processes got created. What's wrong with Win32::OLE or my code? Comments please, Jan? Glen > -----Original Message----- > From: Price, Steve A [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 07, 2002 7:06 PM > To: 'Moulder, Glen' > Subject: RE: Phantom process? > > > have you tried > > $obj = Win32::OLE->new('Access.Application',{$_[0]->Quit();}) > > or > > $obj = Win32::OLE->new('Access.Application',{$_[0]->Exit();}) > > regards > > Steve > > -----Original Message----- > From: Moulder, Glen [mailto:[EMAIL PROTECTED]] > Sent: 07 February 2002 20:57 > To: perl-win32-users > Subject: Q: Phantom process? > > > Hi Lister, > > Can anybody tell me why, after the following code snippet -- > > $obj = Win32::OLE->new('Access.Application') > print "connected to Access...\n"; $obj->NewCurrentDatabase($someDB); > print "created database $someDB\n"; > $obj->Quit(); > > I still have a process named MSACCESS running on the server? > > The DB gets created and I can not open it from a client PC > down the net, I get a message saying that the DB is in use by > another session. If I kill the MSACCESS instance in the > process list, I can then open the DB. The more times I run > this (to create multiple DBs), the more instances of Access > get created without quitting. > > Platform: Win2k - SP2, Office XP, perl 5.6.1 > > Glen > _______________________________________________ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > > Email Disclaimer > > The information in this email is confidential and may be > legally privileged. It is intended solely for the addressee. > Access to this email by anyone else > is unauthorised. > If you are not the intended recipient, any disclosure, > copying, distribution > or any action taken or omitted to be taken in reliance on it, > is prohibited and may be unlawful. When addressed to our > clients any opinions or advice contained in this email are > subject to the terms and conditions expressed in > the governing KPMG client engagement letter. > _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs