Multithreading when working with database

I'd like to use Parallel to do some database tasks. But when I follow this article, I see that the second example is one thread only.…


How should I do to work with multithreading?

Like 0



Hello Van Ly, 


Using several streams in working with the database via UserConnection may cause issues in starting synchronization or committing transactions. You cannot call the DBExecutor instance methods in the parallel threads. It is recommended to make sure that the call of DBExecutor instance methods is performed consistently in one thread.


Please, let us know in case any further information is required. 


Best regards, 


Olga Avis,

Yes I known it. Does it mean that we cannot use multithreading in any way?


Dear Van Ly,


It is strongly not recommended since it could cause further system failures.


Best regards, 


Show all comments