PC Review


Reply
Thread Tools Rate Thread

closing connections in Access

 
 
Eric
Guest
Posts: n/a
 
      18th Jul 2003
I have a big project here that looks like a connection is being left
open. I've combed through the code for a long time now and wonder if there
are any general strategies anyone could recommend. I've used Visual
Studio's find in files feature to look for every instance of an open
connection and made sure that they were all closed. It seems when you go to
our shopping cart the Access makes it's .ldb file then it will never close.
The connection IS closed in the code though, and I'm out of ideas.


 
Reply With Quote
 
 
 
 
Daily Shmooz
Guest
Posts: n/a
 
      18th Jul 2003
Eric,
I am having the same problem. Are you using MDI forms?

"Eric" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have a big project here that looks like a connection is being left
> open. I've combed through the code for a long time now and wonder if

there
> are any general strategies anyone could recommend. I've used Visual
> Studio's find in files feature to look for every instance of an open
> connection and made sure that they were all closed. It seems when you go

to
> our shopping cart the Access makes it's .ldb file then it will never

close.
> The connection IS closed in the code though, and I'm out of ideas.
>
>



 
Reply With Quote
 
Rob
Guest
Posts: n/a
 
      19th Jul 2003
This is a known problem when accessing MDB files from ASP. If you're
using a shopping cart, you should definately use MSSQL due to
multi-user issues.

Search this forum, MS Support, and Google...I'm sure you'll find a
solution, workaround, or another person suggesting MSSQL.

On Fri, 18 Jul 2003 16:24:30 -0500, "Eric" <(E-Mail Removed)>
wrote:

> I have a big project here that looks like a connection is being left
>open. I've combed through the code for a long time now and wonder if there
>are any general strategies anyone could recommend. I've used Visual
>Studio's find in files feature to look for every instance of an open
>connection and made sure that they were all closed. It seems when you go to
>our shopping cart the Access makes it's .ldb file then it will never close.
>The connection IS closed in the code though, and I'm out of ideas.
>


Please refrain from emailing me so the other
group members can gain from the info as well...
 
Reply With Quote
 
David Sceppa
Guest
Posts: n/a
 
      22nd Jul 2003
Eric,

Is the application still running? Is it a Windows
application or a Web application?

It sounds like you're seeing connection pooling behavior.
By default, when you call Connection.Close(), the actual database
connection is pooled rather than closed. The connections will
time out of the pool after 60 seconds if they are not reused. If
the connection is still in the pool, the Jet engine will not
remove the .ldb file. If you want to disable connection pooling,
you could add "OLE DB Services=-4;" to your connection string.

David Sceppa
Microsoft
This posting is provided "AS IS" with no warranties,
and confers no rights. You assume all risk for your use.
© 2003 Microsoft Corporation. All rights reserved.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing connections David C Microsoft ASP .NET 8 1st Jun 2010 11:12 PM
closing DB connections Steve Microsoft Access ADP SQL Server 20 8th Jan 2007 09:40 PM
closing connections =?Utf-8?B?bGFycnk=?= Windows XP General 3 31st Dec 2006 06:59 PM
Closing connections tshad Microsoft ADO .NET 7 13th Jan 2006 06:27 PM
Connections Not Closing =?Utf-8?B?Slppbms=?= Microsoft ADO .NET 1 18th Mar 2004 06:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:40 PM.