There are several ways to do it but the oldest and most widely used is ODBC. ggogle for "ODBC tutorials" and you will find out how to do it. It's a lot more complex than in VB, so be prepared for a lot of coding and trials. You might find some c++ classes that will help.
If you want to use MySQL database then you can use MySQL++ classes and libraries.