473,406 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 1385
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
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
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
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
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
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
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
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
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
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.