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.
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.