multiple table in MFC

reenajasmine
reenajasmine used Ask the Experts™
on
how to connect multiple table in MFC in a single dialog based app with header file
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
AndyAinscowFreelance programmer / Consultant

Commented:
Make a query based on your tables, base a recordset on that query.  Is that what you require?

eg an SQL such as :
SELECT Adressen.Kurzname, Auftragsadressen.AuftragID
FROM Adressen INNER JOIN Auftragsadressen ON Adressen.PSID = Auftragsadressen.PSID;


Use the class wizard.
Make a CRecordset class.
The interface will present all of your tables.
Click on all of the tables you want to join and click OK.

Back in your code, you will need to modify the m_strFilter as it will contain your WHERE clause.
The WHERE clause is very important as it will bind the results from one table to the other.
The m_strFilter will not need to include the word 'WHERE'.
AndyAinscowFreelance programmer / Consultant

Commented:
My comment would be a way to achieve the desired effect
Commented:
Submitted to PAQ with no points refunded (of 20)

DarthMod
Community Support Moderator

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial