Board index » delphi » help needed. in parent/child relationship , thanx

help needed. in parent/child relationship , thanx

Hi, I am creating an enrolment system in my assignment.
I need a screen (form) that can cross reference some databases i had
created.

so far every thing is fine cos all the forms i have created only requires a
lookup table.

Right now i need a form to look at least two tables.
This is the problem i face.

I have the following
student_details table, key = studentid  ---> student's infromation
subject table, key = subjectid ---> subject information, includes subjectid,
subjectdesc
subject_details table, key = studentid and subjectid  --->student's subject
history

the relationship is
student_details.studentid = subject_details.studentid
and
subject_details.subjectid = subject.subjectid

i want to retrive a student's subject history which is stored in
subject_details table, form the subject_details (this will generate a list
of subjectid based on the studentid), from the subjectid list generated it
will lookup the subject table for the subject_desc.

i'm kind of stuck over here, cos all i have is 1 subject_desc for the whole
list of the subjectids

any know how can that be done??

thanx in advanced.

 

Re:help needed. in parent/child relationship , thanx


If you have Delphi3, you can use the File/New/Business/Database Form
Wizard to create the master/detail form. If you haven't got that you
could try it on somebody else's system and see what it does. The main
thing to do if you are using TTables is to set the MasterSource and
MasterFields properties for the Detail table (Subject_Details) - equal
to the master table/field (student/subject_id). If using TQueries set
the Datasource property for the Detail query to be the Master query and
use the same field names in both queries. Just remembered, in Delphi1
the Help/Tutorial contains a step-by-step example of how to create a
master/detail form.

--
+------------------------------------------------------------------+
| Steve Moran, Flying Objects Ltd, London.                         |
| Custom-built computer programs. Mailto:flyingobje...@hotmail.com |
+------------------------------------------------------------------+

Re:help needed. in parent/child relationship , thanx


If you have Delphi3, you can use the File/New/Business/Database Form
Wizard to create the master/detail form. If you haven't got that you
could try it on somebody else's system and see what it does. The main
thing to do if you are using TTables is to set the MasterSource and
MasterFields properties for the Detail table (Subject_Details) - equal
to the master table/field (student/subject_id). If using TQueries set
the Datasource property for the Detail query to be the Master query and
use the same field names in both queries. Just remembered, in Delphi1
the Tutorial contains a step-by-step example of how to create a
master/detail form.

--
+------------------------------------------------------------------+
| Steve Moran, Flying Objects Ltd, London.                         |
| Custom-built computer programs. Mailto:flyingobje...@hotmail.com |
+------------------------------------------------------------------+

Other Threads