Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Won't Quit

Status
Not open for further replies.

TudorSmith

Programmer
Jan 14, 2002
245
GB
Yikes!

In my AccessDB, I am interrogating an Oracle Database to retrieve data into a dump table.

Code:
Set dbFC = New ADODB.Connection
dbFC.Provider = "MSDAORA"
dbFC.Open "MyServer", "MyUser", "MyPassword"

I've removed the actual specifcs to protect the innocent ::)

Now, when I quite the DB, I am setting the dbFC variable to Nothing

Code:
Set dbFC = Nothing

The application closes but MSAccess stays open.

I tried opening the app and not running the import process. The app closes fine, so I figure somewhere in the process, I am initiating OLE to connect to the Oracle DB, and it is not releasing it!

Can anyone suggest how to release the OLE object so that MSAccess can close fully?

Thanks

Tudor

birklea ~©¿©~ <><
Dim objJedi as Jedi.Knight
Set objJedi[skyWalker].Aniken = FatherOf(useThe.Force(objJedi[skyWalker].luke))
 
Would'nt you want a:

Code:
dbFC.Close
to close the connection, before setting it to Nothing.



Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
I just added that line (dbFC.close) and got the error message "Operation is not allowed when the object is close"

I had that line when I was testing all my options so I guess I've got it in there anyway!

Still leaves MSAccess shell open!

Oh, and to quit I'm using "DoCmd.Quit", but sometimes I open the form in Design View, and I get an Error "Quit is not available"

Odd eh?

birklea ~©¿©~ <><
Dim objJedi as Jedi.Knight
Set objJedi[skyWalker].Aniken = FatherOf(useThe.Force(objJedi[skyWalker].luke))
 
hmmmmm. interesting. Dont know what the problem is, but you might try putting a docmd.quit after a line of code, starting from the first line, and moving it down, to see if you can identify exactly where the problem sources. Good luck.

Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
Try Application.Quit instead.

Ed Metcalfe.

Please do not feed the trolls.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top