Suitable Design Pattern for C++ Daya Access Layer

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2009
Posts: 1
Reputation: rahim_rasimin is an unknown quantity at this point 
Solved Threads: 0
rahim_rasimin rahim_rasimin is offline Offline
Newbie Poster

Suitable Design Pattern for C++ Daya Access Layer

 
0
  #1
Jul 24th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,651
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1499
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
Still Learning

Re: Suitable Design Pattern for C++ Daya Access Layer

 
0
  #2
Jul 25th, 2009
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.
Last edited by Ancient Dragon; Jul 25th, 2009 at 6:52 am.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 268 | Replies: 1
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC