Access database does not close in the ASP.Net application

G

Guest

Hello,

I have been using MS Access database for my ASP.Net application. In spite
of me doing the close method, the access database remains in use (.ldb file
is there). If I bring down the "Web Publishing Service", the Access lock
file disappears.

What should I be doing to make sure that the database closes properly, once
the .aspx file has finished processing.

I would appreciate the help.
 
W

William \(Bill\) Vaughn

I would expect that the OLE DB connection pool manager is holding open the
connection. You could try to disable connection pooling but that would make
performance even worse.
I would be very hesitant to use a JET/Access database in a web site for this
and a litany of other reasons.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
G

Guest

Hello Bill,

Thanks for the quick reply. Where would I find OLE DB Connection pool
manager setting? I am using the good old Jet 4.0 connect string with no
reference to connection pooling. Please note that the same connect string
does close the database when used in the old ASP environment.

I would appreciate the help again.

Regards.

Ash
 
L

Landley

Hi Ash,

Are you connection pooling or simply opening and closing connection as and
when you need to. I have used the latter and found no issues. Such methods
as creating a connection without opening it, filling a dataset using a
DataAdapter works a treat. The connection is closed automatically by the
DataAdapter.

If you are using connection pooling, how are keeping hold of the connection?
Are you the Application/Session object to store that connection? If you are
using the Application object, the connection will remain until the web
application times out.

If you web site is to have less than 50 concurrent connections, IMO you do
not need to pool your connection.

The other thing to check is how the web server is setup. IIS is known for
keeping hold of objects, even after Session and Application time outs.

L.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top