|
|
|
date: Mon, 27 Mar 2006 04:50:02 -0800,
group: microsoft.public.access.odbcclientsvr
back
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
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
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
|
|