Please advice me what is the most suitable Design Pattern for C++ to create Data Access Layer. Objective is to have clear separate layer for Presentation Layer, Business Logic, and Data Access Layer.

Sub Question:
1. In C#, there was Dataset class to get data tabular records from query. What is suppose for C++? I did try to use vector<string*> as return function/method but I am not sure is it the best solution.

Advance thanks for shared knowledge from you all.


Use either ODBC or ADO in c++ programs. Neither are for the faint of heart and require a firm grasp of c or c++ fundamentals. Microsoft's MFC class also has a database class.

Once you have the query, I'd put the query contents in a vector< vector<string>> object, assuming all the columns are strings. If the columns are a mixture of datatypes, which is a common thing, then you might want to create a union structure and put them in a vector of those structures.