My search led me to SOCI which is a C++ Database Access Library. I quote from their website:
The idea is to provide C++ programmers a way to access SQL databases in the most natural and intuitive way.From what I can see SOCI looks to be the best thing for what I want to achieve.
http://soci.sourceforge.net