Question about Master / Detail with SDAC 4.x
Posted: Wed 04 Jul 2007 09:10
Dear Support,
I use Delphi 7 prof. and SDAC 4.x ver. professional.
I see your SDACDEMO.
I have a question about demo Master - Detail under General Demos.
I see 2 checkboxes :
1) SQL Links
2) Simple field link.
I note that if I select first check when I insert a new record in detail, field DEPTNO is empty; while if I select second check when I insert a new record in detail, field DEPTNO set automatically value that is present in DEPTNO of the master table.
If I see code note that source is obviously different.
In case 1) source contains quDetail.DetailFields := '' and quDetail.MasterFields := '';.
In case 2) source contains quDetail.DetailFields := 'DEPTNO'; and quDetail.MasterFields := 'DEPTNO'.
If I create M/D relationship with two tables and if I want automatically set field of foreign key of the detail table I must use property DetailFields and MasterFields of my Dataset.
If I create classic M/D via SQL link without set this two properties Detailfields and MasterFields of the detail table, field that is used for link is not automatically fill.
Is this correct ?
Where can I find more information about M/D with your SDAC components ?
Best regards.
Sergio Bertolotti
I use Delphi 7 prof. and SDAC 4.x ver. professional.
I see your SDACDEMO.
I have a question about demo Master - Detail under General Demos.
I see 2 checkboxes :
1) SQL Links
2) Simple field link.
I note that if I select first check when I insert a new record in detail, field DEPTNO is empty; while if I select second check when I insert a new record in detail, field DEPTNO set automatically value that is present in DEPTNO of the master table.
If I see code note that source is obviously different.
In case 1) source contains quDetail.DetailFields := '' and quDetail.MasterFields := '';.
In case 2) source contains quDetail.DetailFields := 'DEPTNO'; and quDetail.MasterFields := 'DEPTNO'.
If I create M/D relationship with two tables and if I want automatically set field of foreign key of the detail table I must use property DetailFields and MasterFields of my Dataset.
If I create classic M/D via SQL link without set this two properties Detailfields and MasterFields of the detail table, field that is used for link is not automatically fill.
Is this correct ?
Where can I find more information about M/D with your SDAC components ?
Best regards.
Sergio Bertolotti