473,508 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Asp.net fails to connect to access db after a while

My asp.net app fails to make any further connections to
my access db after surfing for a while. This error also
brings down the entire site for all other users as well.
Made sure to close all connections and even call dispose
when done. Access lock remains for a while. The file
size of the access db grows from about 500k to 2.5 mb
after browsing the site for a couple of minutes. I'm
using forms authentication with a login script. Never
ran into this problem with the same type of access db
with asp 3.0 web applications. Just recently started
using asp.net. Please help!
Nov 17 '05 #1
4 1387
Did you "close" and "dispose" the "OledbDataReader" and/or "DataAdaptor" in
you behinde code?
Check it first.

"mark" <an*******@discussions.microsoft.com> wrote in message
news:0c****************************@phx.gbl...
My asp.net app fails to make any further connections to
my access db after surfing for a while. This error also
brings down the entire site for all other users as well.
Made sure to close all connections and even call dispose
when done. Access lock remains for a while. The file
size of the access db grows from about 500k to 2.5 mb
after browsing the site for a couple of minutes. I'm
using forms authentication with a login script. Never
ran into this problem with the same type of access db
with asp 3.0 web applications. Just recently started
using asp.net. Please help!

Nov 17 '05 #2
Did you "close" and "dispose" the "OledbDataReader" and/or "DataAdaptor" in
you behinde code?
Check it first.

"mark" <an*******@discussions.microsoft.com> wrote in message
news:0c****************************@phx.gbl...
My asp.net app fails to make any further connections to
my access db after surfing for a while. This error also
brings down the entire site for all other users as well.
Made sure to close all connections and even call dispose
when done. Access lock remains for a while. The file
size of the access db grows from about 500k to 2.5 mb
after browsing the site for a couple of minutes. I'm
using forms authentication with a login script. Never
ran into this problem with the same type of access db
with asp 3.0 web applications. Just recently started
using asp.net. Please help!

Nov 17 '05 #3
Yes, I close the datareader. I don't see a dispose method
for the reader though. I really can't see what would be
causing this. Here's a example of how I'm opening and
closing my database:
Public Function getCatname(ByVal catID As String)
Dim myConnection As OleDbConnection = New
OleDbConnection(ConfigurationSettings.AppSettings
("ConnectionString"))
Dim myCommand As OleDbCommand = New
OleDbCommand("qCatName", myConnection)
myCommand.CommandType =
CommandType.StoredProcedure

Dim parameterProductID As OleDbParameter = New
OleDbParameter("catID", OleDbType.VarChar, 50)
parameterProductID.Value = catID
myCommand.Parameters.Add(parameterProductID)

Try
myConnection.Open()
Dim rs As OleDbDataReader =
myCommand.ExecuteReader
Dim catName As String
While rs.Read
catName = rs("CATEGORY")
End While
rs.Close()
Return catName
myCommand.Dispose()
myConnection.Close()
myConnection.Dispose()
myConnection = Nothing
Catch
Return Nothing
End Try
GC.Collect()
End Function

I'm using Access 2000 by the way. Thanks for the info.
-----Original Message-----
Did you "close" and "dispose" the "OledbDataReader" and/or "DataAdaptor" inyou behinde code?
Check it first.

"mark" <an*******@discussions.microsoft.com> wrote in messagenews:0c****************************@phx.gbl...
My asp.net app fails to make any further connections to
my access db after surfing for a while. This error also
brings down the entire site for all other users as well.
Made sure to close all connections and even call dispose
when done. Access lock remains for a while. The file
size of the access db grows from about 500k to 2.5 mb
after browsing the site for a couple of minutes. I'm
using forms authentication with a login script. Never
ran into this problem with the same type of access db
with asp 3.0 web applications. Just recently started
using asp.net. Please help!

.

Nov 17 '05 #4
Yes, I close the datareader. I don't see a dispose method
for the reader though. I really can't see what would be
causing this. Here's a example of how I'm opening and
closing my database:
Public Function getCatname(ByVal catID As String)
Dim myConnection As OleDbConnection = New
OleDbConnection(ConfigurationSettings.AppSettings
("ConnectionString"))
Dim myCommand As OleDbCommand = New
OleDbCommand("qCatName", myConnection)
myCommand.CommandType =
CommandType.StoredProcedure

Dim parameterProductID As OleDbParameter = New
OleDbParameter("catID", OleDbType.VarChar, 50)
parameterProductID.Value = catID
myCommand.Parameters.Add(parameterProductID)

Try
myConnection.Open()
Dim rs As OleDbDataReader =
myCommand.ExecuteReader
Dim catName As String
While rs.Read
catName = rs("CATEGORY")
End While
rs.Close()
Return catName
myCommand.Dispose()
myConnection.Close()
myConnection.Dispose()
myConnection = Nothing
Catch
Return Nothing
End Try
GC.Collect()
End Function

I'm using Access 2000 by the way. Thanks for the info.
-----Original Message-----
Did you "close" and "dispose" the "OledbDataReader" and/or "DataAdaptor" inyou behinde code?
Check it first.

"mark" <an*******@discussions.microsoft.com> wrote in messagenews:0c****************************@phx.gbl...
My asp.net app fails to make any further connections to
my access db after surfing for a while. This error also
brings down the entire site for all other users as well.
Made sure to close all connections and even call dispose
when done. Access lock remains for a while. The file
size of the access db grows from about 500k to 2.5 mb
after browsing the site for a couple of minutes. I'm
using forms authentication with a login script. Never
ran into this problem with the same type of access db
with asp 3.0 web applications. Just recently started
using asp.net. Please help!

.

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4505
by: Gloria | last post by:
Hi, I've been having problems with my CGI script, it overloads the server. I think it's because the database connection fails because the following error is logged whenever the server overloads. ...
33
3912
by: n00m | last post by:
import socket, thread host, port = '192.168.0.3', 1434 s1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s2 = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s2.connect((host, 1433))...
0
292
by: mark | last post by:
My asp.net app fails to make any further connections to my access db after surfing for a while. This error also brings down the entire site for all other users as well. Made sure to close all...
1
1365
by: adam | last post by:
On Thursday it was working, then something changed and now I can't access my sql server database from aspx :( I have simplified my code to a simple connect and query where m_sql, m_con are text...
2
2138
by: jannordgreen | last post by:
I try to run http://localhost/scroller/scrollertest.asp in my IE 6 browser. The asp program tries to connect to a MS Access 97 database. The program works when the database is sitting on any...
5
4853
by: mr.newsgroupguy | last post by:
I am working in C# .NET 1.1. My app has a button on its main form that checks to see if it has access to a file on our server, just an XML file. On our server we are running W2K IIS with a...
0
3184
by: kkos | last post by:
I noticed the following issue posted as a double-hop issue in many discussion boards but found no answers that explain how to pass the second hop with windows auth from IIS ASPX page to remote SQL...
1
4445
by: Ralf | last post by:
Situation: .NET windows service All works fine until we digitally signed the service exe. After that starting the service often fails (A timeout was reached (30000 milliseconds) while waiting...
2
1919
by: Jeremy | last post by:
I'm getting a list of files from an ftp site using the following method. On the first call this works perfectly. On the 2nd call, it fails with the following error. On the 3rd call it succeeds...
0
7129
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7333
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7398
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3194
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.