October 16th, 2012, 06:53 PM
C++ ODBC Multi Connections to Same DB or not?
I made a C++ Wrapper on top of ODBC.
I got a Connection, and a Statement class.
The Connection class holds the Database Connection ODBC Handle.
The Statement class holds the Statement Handle, there can be multiple per Connection. It is made and destroyed each time a query must be done on the DB.
Now I'm just wondering.
I have a multithreaded application.
Is keeping one Connection for one DB enough for the whole application? Where the different threads will make Statements based on that one Connection.
Or is it better to keep a Connection per thread?
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!