0

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.

TQ

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by Ancient Dragon
0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.