Too many sessions already active

B

bill

I have been "Googling" for about an hour and am turning up squat! I just
started receiving this error when trying to log into a MS Access database
from a vb .net web application. Recycling IIS seems to temporarily fix the
problem, but I am at a loss on how to view the total # of "active" sessions,
etc... any ideas or suggestions would be greatly appreciated!



Could not start session. Too many sessions already active.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Could not start
session. Too many sessions already active
 
G

George Ter-Saakov

You are not very descriptive.
What do you mean by "log into" MS Access.....

Most likely your application does not close DB Connections. hence the
message when too many are open
Show us your code where you retrieve data from MS Access.

George.
 
B

bill

Sorry about that.... here is a snip of sample code. We have Close
statements throughout the pages, so I am thinking it isn't that... but I
could be missing something?

Dim myConn As New OleDbConnection(AppSettings("myConnectionString"))
Dim mySQL As String = "SELECT * FROM myTable WHERE ID=" & myID
Dim cmd As New OleDbCommand(mySQL, myConn)
Dim da As New OleDbDataAdapter
Dim ds As New DataSet
da.SelectCommand = cmd
da.Fill(ds, "myTable")
myConn.Close()

note that myConnectionString is set to
"PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=D:\data\myDatabase.mdb" />
 
G

George Ter-Saakov

Your code has a problem in case there is an error thrown. Connection will
never be closed...
Proper way would be to enclose it with try... catch ( do not know how it is
in VB)

George
 
L

LVP

close your connection in the "Finally" section of your try catch statement
provided it is not null or nothing.
Are you using XP as your web server for testing then it might have
limitations on the number of connections to it.
 
B

bill

Here is what is strange... we never got those errors UNTIL I put in the
close statements. Prior to last week, the database connections were never
programmatically being closed... it just doesn't make sense to me...
 

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

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top