Duplicate of connect to database using c++. Thread closed.