Nothing in OLEDB.* is thread safe?

  • Thread starter Thread starter Benjamin Walling
  • Start date Start date
B

Benjamin Walling

It looks like the DataSet & DataTable objects are thread safe, but there are
no OLEDB.* objects I can use to populate it that are thread safe. I have
109 remote offices running Sybase ASA. I have a process that reads in the
data from these offices and synchronizes it with our SQL Server. When run
in series, the process takes about 3 hours, mostly due to the 128k lines it
is reading data from. I'd like to run this process in multiple threads, but
it seems that the OLEDB DataReader, Command, and Connection objects get
"shared" between threads, and I end up with data from another thread's
office in a DataReader in another thread.

How can I do this? If I launch entirely separate processes (just execute
the program simultaneously five times), I don't have any problems. I just
get the problems with multiple threads in the same process. I've checked to
make sure that none of my classes have any shared functions/subs/variables.
 
I would look into a native managed provider for Sybase. Start here...
http://www.datadirect-technologies.com/products/dotnet/matrix/dotnetmatrix.htm.
DataDirect seems to be on top of the technology in many respects.

hth

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
MVP, hRD
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.
__________________________________
 
Back
Top