1. I’m not a C++ developer, but I think I can answer this question. You need to use ODBC drivers.
At the beginning of your file, include:
Then in your appropriate function:
SQLHDBC dbc; /* assume already allocated */
ret = SQLDriverConnect(dbc, NULL, "DSN=mydsn;", SQL_NTS,
NULL, 0, NULL, SQL_DRIVER_COMPLETE);
(Reference: ODBC from C Tutorial Part 1)
In order for all this to work you need to configure the access database as a data store in odbc. You can do this by going to Administrative tools in control panel and opening data sources(ODBC)
What you do with the ret variable is a bit past me, I always did by Access UI using Visual Basic. That language has a lot more intuitive access to the odbc store.
Take a look at these similar questions: