Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Access
3rdpartyusrgrp
access
activexcontrol
adp.sqlserver
commandbarsui
conversion
dataaccess.pages
developers.toolkitode
devtoolkits
externaldata
forms
formscoding
gettingstarted
internet
interopoledde
macros
modulescoding
modulesdaovba
modulesdaovba.ado
multiuser
odbcclientsvr
queries
replication
reports
security
setupconfig
tablesdbdesign
  
 
date: Mon, 27 Mar 2006 04:50:02 -0800,    group: microsoft.public.access.odbcclientsvr        back       


Closing ODBC connections   
1.  My application pre-connects to an Oracle database.  In other words, it 
prompts the user for an Oracle user ID and password in a nice little Access 
form.  

2.  In my pre-connect module (on button click), I set the connect string for 
the database, and use the .OpenDatabase method to connect.

3.  Next, I cleanup by closing the database object and setting it to 
"Nothing".   Through some miracle I don't understand, the connection to 
Oracle remains open even though I closed everything.

My question: when my MS Access application closes, how do I tell the Oracle 
connection that I'm finished?  Do I need to?  I'd like to be sure I'm 
cleaning up as best I can.

Thanks.
date: Mon, 27 Mar 2006 04:50:02 -0800   author:   David Mueller

Re: Closing ODBC connections   
hi David,

David Mueller wrote:
> My question: when my MS Access application closes, how do I tell the Oracle 
> connection that I'm finished?  Do I need to?  I'd like to be sure I'm 
> cleaning up as best I can.
ODBC connections are cached, afaik only closing Access itself drops the 
connection.


mfG
--> stefan <--
date: Mon, 27 Mar 2006 15:30:02 +0200   author:   Stefan Hoffmann

Re: Closing ODBC connections   
Setting the connection to Nothing cleans up the VBA connection object,
but does nothing to the server connection. I don't know Oracle, but
isn't there some way to issue a command to Oracle itself to drop the
connection before you set the VBA object to Nothing?

--Mary

On Mon, 27 Mar 2006 04:50:02 -0800, David Mueller
 wrote:

>
>1.  My application pre-connects to an Oracle database.  In other words, it 
>prompts the user for an Oracle user ID and password in a nice little Access 
>form.  
>
>2.  In my pre-connect module (on button click), I set the connect string for 
>the database, and use the .OpenDatabase method to connect.
>
>3.  Next, I cleanup by closing the database object and setting it to 
>"Nothing".   Through some miracle I don't understand, the connection to 
>Oracle remains open even though I closed everything.
>
>My question: when my MS Access application closes, how do I tell the Oracle 
>connection that I'm finished?  Do I need to?  I'd like to be sure I'm 
>cleaning up as best I can.
>
>Thanks.
>
date: Mon, 27 Mar 2006 14:57:27 -0500   author:   Mary Chipman [MSFT]

Re: Closing ODBC connections   
Mary,
The 'disconnect' command will disconnect you from an Oracle database in 
SQL/Plus. I suppose you could issue the same command through an Access 
PassThrough query, although I have never tried it.

-- 
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List: 
http://home.bendbroadband.com/conradsystems/accessjunkie.html



"Mary Chipman [MSFT]"  wrote in message 
news:6qgg225fj15urnsfkp8fv5smaanjhfkl7p@4ax.com...
> Setting the connection to Nothing cleans up the VBA connection object,
> but does nothing to the server connection. I don't know Oracle, but
> isn't there some way to issue a command to Oracle itself to drop the
> connection before you set the VBA object to Nothing?
>
> --Mary
>
> On Mon, 27 Mar 2006 04:50:02 -0800, David Mueller
>  wrote:
>
>>
>>1.  My application pre-connects to an Oracle database.  In other words, it
>>prompts the user for an Oracle user ID and password in a nice little 
>>Access
>>form.
>>
>>2.  In my pre-connect module (on button click), I set the connect string 
>>for
>>the database, and use the .OpenDatabase method to connect.
>>
>>3.  Next, I cleanup by closing the database object and setting it to
>>"Nothing".   Through some miracle I don't understand, the connection to
>>Oracle remains open even though I closed everything.
>>
>>My question: when my MS Access application closes, how do I tell the 
>>Oracle
>>connection that I'm finished?  Do I need to?  I'd like to be sure I'm
>>cleaning up as best I can.
>>
>>Thanks.
>>
date: Tue, 28 Mar 2006 07:32:20 -0600   author:   Lynn Trapp

Re: Closing ODBC connections   
Wouldn't you have to issue the disconnect through the same connection?
If it's opened in VBA code, closing it through a pass-through query
probably won't work. Just guessing since I'm Oracle-challenged :-)

--Mary

On Tue, 28 Mar 2006 07:32:20 -0600, "Lynn Trapp"
 wrote:

>Mary,
>The 'disconnect' command will disconnect you from an Oracle database in 
>SQL/Plus. I suppose you could issue the same command through an Access 
>PassThrough query, although I have never tried it.
date: Sun, 02 Apr 2006 11:14:20 -0400   author:   Mary Chipman [MSFT]

Re: Closing ODBC connections   
The disconnect command is a property of the SQL/Plus application, not an 
Oracle function.  I can't think of any way short of closing Access to 
drop the connection if you're using linked tables.  Unless, of course, 
you're trying to keep the connection open, in which case Access will 
close it for you at the least opportune moment. / Mattias

From: Lynn Trapp, on 3/28/2006 8:32 AM:
> Mary,
> The 'disconnect' command will disconnect you from an Oracle database in 
> SQL/Plus. I suppose you could issue the same command through an Access 
> PassThrough query, although I have never tried it.
>
date: Sun, 02 Apr 2006 12:36:23 -0400   author:   Mattias Jonsson

Re: Closing ODBC connections   
Mary,
That's most likely correct. Like I said, I've never tried to use the 
disconnect command in Access, so was shooting in the dark.

You're too hard on yourself, Mary. You could own Oracle in a couple of 
weeks. <g>

-- 
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List: 
http://home.bendbroadband.com/conradsystems/accessjunkie.html



"Mary Chipman [MSFT]"  wrote in message 
news:2gqv229b8fbrij6eigdigivrmvek0884ai@4ax.com...
> Wouldn't you have to issue the disconnect through the same connection?
> If it's opened in VBA code, closing it through a pass-through query
> probably won't work. Just guessing since I'm Oracle-challenged :-)
>
> --Mary
>
> On Tue, 28 Mar 2006 07:32:20 -0600, "Lynn Trapp"
>  wrote:
>
>>Mary,
>>The 'disconnect' command will disconnect you from an Oracle database in
>>SQL/Plus. I suppose you could issue the same command through an Access
>>PassThrough query, although I have never tried it.
date: Mon, 3 Apr 2006 08:52:14 -0500   author:   Lynn Trapp

Re: Closing ODBC connections   
> The disconnect command is a property of the SQL/Plus application, not an 
> Oracle function.  I can't think of any way short of closing Access to drop 
> the connection if you're using linked tables.

It was just a shot in the dark.

> Unless, of course, you're trying to keep the connection open, in which 
> case Access will close it for you at the least opportune moment.

ROFL...that is so true.

-- 
Lynn Trapp
MS Access MVP
date: Mon, 3 Apr 2006 08:53:19 -0500   author:   Lynn Trapp

Re: Closing ODBC connections   
I'm pretty sure I could issue a command to Oracle before closing the VBA 
object, but in this case, I need the Oracle server connection to remain open 
as long as the user has Access open.

When Access closes, I'm wondering if I'm [Access is] leaving open 
connections on the server side.  If so, it hasn't hurt anything for a couple 
years now, and the DBAs don't call me.  

I'll just proceed business as usual.  Thanks all.




"Mary Chipman [MSFT]" wrote:

> Setting the connection to Nothing cleans up the VBA connection object,
> but does nothing to the server connection. I don't know Oracle, but
> isn't there some way to issue a command to Oracle itself to drop the
> connection before you set the VBA object to Nothing?
> 
> --Mary
> 
> On Mon, 27 Mar 2006 04:50:02 -0800, David Mueller
>  wrote:
> 
> >
> >1.  My application pre-connects to an Oracle database.  In other words, it 
> >prompts the user for an Oracle user ID and password in a nice little Access 
> >form.  
> >
> >2.  In my pre-connect module (on button click), I set the connect string for 
> >the database, and use the .OpenDatabase method to connect.
> >
> >3.  Next, I cleanup by closing the database object and setting it to 
> >"Nothing".   Through some miracle I don't understand, the connection to 
> >Oracle remains open even though I closed everything.
> >
> >My question: when my MS Access application closes, how do I tell the Oracle 
> >connection that I'm finished?  Do I need to?  I'd like to be sure I'm 
> >cleaning up as best I can.
> >
> >Thanks.
> >
>
date: Tue, 4 Apr 2006 10:14:03 -0700   author:   David Mueller

Re: Closing ODBC connections   
Access should take care of it, unless you drop a network connection. 
Your DBA has a system view that shows count of dropped connections per 
username.  They would be able to tell you, unless you decide it is 
better to let sleeping dogs lie.

From: David Mueller, on 4/4/2006 1:14 PM:
> When Access closes, I'm wondering if I'm [Access is] leaving open 
> connections on the server side.  If so, it hasn't hurt anything for a couple 
> years now, and the DBAs don't call me.
date: Tue, 04 Apr 2006 13:22:24 -0400   author:   Mattias Jonsson

Re: Closing ODBC connections   
Yeah, right. That and the Brooklyn Bridge :-)

On Mon, 3 Apr 2006 08:52:14 -0500, "Lynn Trapp"
 wrote:

>Mary,
>That's most likely correct. Like I said, I've never tried to use the 
>disconnect command in Access, so was shooting in the dark.
>
>You're too hard on yourself, Mary. You could own Oracle in a couple of 
>weeks. <g>
date: Wed, 05 Apr 2006 13:06:30 -0400   author:   Mary Chipman [MSFT]

Re: Closing ODBC connections   
ROFL...If I can learn Oracle, then you could do it in a heartbeat.

-- 
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List: 
http://home.bendbroadband.com/conradsystems/accessjunkie.html



"Mary Chipman [MSFT]"  wrote in message 
news:58u732dd1p782mmtk3ecl1od44i7qnsj7j@4ax.com...
> Yeah, right. That and the Brooklyn Bridge :-)
>
> On Mon, 3 Apr 2006 08:52:14 -0500, "Lynn Trapp"
>  wrote:
>
>>Mary,
>>That's most likely correct. Like I said, I've never tried to use the
>>disconnect command in Access, so was shooting in the dark.
>>
>>You're too hard on yourself, Mary. You could own Oracle in a couple of
>>weeks. <g>
date: Wed, 5 Apr 2006 14:13:25 -0500   author:   Lynn Trapp

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us