Link to home
Start Free TrialLog in
Avatar of reenajasmine
reenajasmine

asked on

multiple table in MFC

how to connect multiple table in MFC in a single dialog based app with header file
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

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'.
My comment would be a way to achieve the desired effect
ASKER CERTIFIED SOLUTION
Avatar of DarthMod
DarthMod
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial