I have an application where I have a list of patients and I need to perform 3 or 4 database accesses, create a report, and send a email for each. I'd like to try it with thread pooling to see if it increases the speed.
My question is about the database connection. I'm assuming I can't use one database connection and pass it to every thread due to collisions. How do I handle getting each thread a database connection?
I wouldn't make sense for each one to create and delete it's connection each time I don't think. So is there an easy way to handle this?
Thanks,
Bernie
My question is about the database connection. I'm assuming I can't use one database connection and pass it to every thread due to collisions. How do I handle getting each thread a database connection?
I wouldn't make sense for each one to create and delete it's connection each time I don't think. So is there an easy way to handle this?
Thanks,
Bernie