Make the query object inherit from stringstream so queries can be streamed into a query.
Make the query.execute() thread safe to ensure that threads with the same database handle cannot execute queries simultaneously (ODBC querying is NOT thread safe).