But what kind connection? a simple SQL connection to query stuffs?
Client DLL? not recommended at all since you have to put your credentials there.
Server DLL? of course, it's C++ after all.
There is a guide from Microsoft Documents:

A quick example: