Yes I am (or was). Each single connection was through a different thread.
Because you can only have one Datareader open I had to define a seperate
connection for each thread which was a pain (whereas I did have the
connection as public). There could be a large number of threads generated
(100 up).
Since posting this I have found the answer. There is a restriction of 64
connections on a database. I have now managed to sych the threads so that I
close some before opening too many.
Thanks for your help.
-Jerry
"W.G. Ryan eMVP" <Wi*********@NoSpam.gmail.com> wrote in message
news:eh**************@tk2msftngp13.phx.gbl...
Jerry:
connection objects aren't Thread Safe. I can't tell what's going on just
from this - but it should blow up pretty quickly. When are you sending
Command objects through?
However, I just say that on GP - I'm guessing the connection pool is full
on the Access DB. Please tell me that you aren't seriously trying to open >
5 connections to an access DB?
--
W.G. Ryan MVP (Windows Embedded)
TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Jerry Spence1" <je**********@somewhere.com> wrote in message
news:41***********************@ptn-nntp-reader03.plus.net... I am starting up a number of threads. Each one specifies a connection to
the same database.
Sub ReaderThread()
Dim cn As New System.Data.OleDb.OleDbConnection
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
dbaseFile
cn.Open()
etc...
After the 65th thread starts up I get the error:
{System.Data.OleDb.OleDbException}
[System.Data.OleDb.OleDbException]:
{System.Data.OleDb.OleDbException} HelpLink: Nothing
InnerException: Nothing
Message: "Unspecified error"
Source: "Microsoft JET Database Engine"
StackTrace: " at
System.Data.OleDb.OleDbConnection.ProcessResults(I nt32 hr)
at System.Data.OleDb.OleDbConnection.InitializeProvid er()
at System.Data.OleDb.OleDbConnection.Open()
at EDAC_DataLogger.Form1.ReaderThread() in C:\Company\xxxxxxxxxx
DataLogger Form1 V1.1.vb:line 212"
TargetSite: {System.Reflection.RuntimeMethodInfo}
The error on line 212 is the cn.Open() command. I don't know if there is
something significant about opening 65 connections. If I do 64 threads
it all runs OK.
-Jerry