Hello,
That would all depend on the database and the platform. If you're connecting to an ODBC compatible database, you need of course ODBC drivers on each workstation and program against the ODBC API. If you are going to use a native interface to your database, you need custom libraries from your database vendor, possibly specific for your compiler as well.
I didn't find the right solution from the internet.
References: https://www.go4expert.com/forums/connect-database-using-cpp-t27211/ whiteboard animation