Board index » jbuilder » Re: Master Detail

Re: Master Detail


2004-06-18 01:55:22 PM
jbuilder20
"Ali" < XXXX@XXXXX.COM >wrote in message
Quote
What could be the possible reasons for master - detail relationship not
working ?

It would stop working if the Master didn't pay attention to the Detail.
 
 

Re:Re: Master Detail

Hi,
i have this configuration at run-time :
DataModulo1 :
1) qryMaster (TSQLQuery)
2) ProviderMaster (TDataSetProvider) with dataSet := qryMaster
3) CdsMaster (TClientDataSet) with ProviderName := 'ProviderMaster'
DataModulo2 :
1) dtsMasterDetail (TDataSource) with DataSet := qryMaster
2) qryDetail (TSQLQuery) with DataSource := dtsMasterDetail
3) cdsDetail (TClientDataSet) with DataSetField :=
CdsMaster.FieldByName('qryDetail')
If i have a Master and a Detail, it's ok, but, if i have two Detail :
dmDetail1 : TDataModulo2;
dmDetail2 : TDataModulo2;
and ....
dmDetail1.qryDetail.Sql.Text := 'SELECT * FROM TABLE_DETT1 WHERE
DTCOD = : MTCOD';
dmDetail2.qryDetail.Sql.Text := 'SELECT * FROM TABLE_DETT2 WHERE
DTCOD = : MTCOD';
when i create the DataSetFields on Master ClientDataSet both have the
name = 'qryDetail'.....
and at open ... raise excepetion....
Please...help me
Rino
Sorry for my english.
p.s. I use Delphi2005 Win32 and DB2 rel.7.2
 

Re:Re: Master Detail

Hi,
i have this configuration at run-time :
DataModulo1 :
1) qryMaster (TSQLQuery)
2) ProviderMaster (TDataSetProvider) with dataSet := qryMaster
3) CdsMaster (TClientDataSet) with ProviderName := 'ProviderMaster'
DataModulo2 :
1) dtsMasterDetail (TDataSource) with DataSet := qryMaster
2) qryDetail (TSQLQuery) with DataSource := dtsMasterDetail
3) cdsDetail (TClientDataSet) with DataSetField :=
CdsMaster.FieldByName('qryDetail')
If i have a Master and a Detail, it's ok, but, if i have two Detail :
dmDetail1 : TDataModulo2;
dmDetail2 : TDataModulo2;
and ....
dmDetail1.qryDetail.Sql.Text := 'SELECT * FROM TABLE_DETT1 WHERE
DTCOD = : MTCOD';
dmDetail2.qryDetail.Sql.Text := 'SELECT * FROM TABLE_DETT2 WHERE
DTCOD = : MTCOD';
when i create the DataSetFields on Master ClientDataSet both have the
name = 'qryDetail'.....
and at open ... raise excepetion....
Please...help me
Rino
Sorry for my english.
p.s. I use Delphi2005 Win32 and DB2 rel.7.2
 

{smallsort}

Re:Re: Master Detail

Have you added Matching Parameters in the Detail Clientdataset and
set the MasterSource/MasterFields properties of the Detail Client DataSet;
Regards,
Robert.
"Rino " < XXXX@XXXXX.COM >wrote in message
Quote

Hi,
i have this configuration at run-time :

DataModulo1 :
1) qryMaster (TSQLQuery)
2) ProviderMaster (TDataSetProvider) with dataSet := qryMaster
3) CdsMaster (TClientDataSet) with ProviderName := 'ProviderMaster'

DataModulo2 :

1) dtsMasterDetail (TDataSource) with DataSet := qryMaster
2) qryDetail (TSQLQuery) with DataSource := dtsMasterDetail
3) cdsDetail (TClientDataSet) with DataSetField :=
CdsMaster.FieldByName('qryDetail')

If i have a Master and a Detail, it's ok, but, if i have two Detail :
dmDetail1 : TDataModulo2;
dmDetail2 : TDataModulo2;

and ....

dmDetail1.qryDetail.Sql.Text := 'SELECT * FROM TABLE_DETT1 WHERE
DTCOD = : MTCOD';

dmDetail2.qryDetail.Sql.Text := 'SELECT * FROM TABLE_DETT2 WHERE
DTCOD = : MTCOD';

when i create the DataSetFields on Master ClientDataSet both have the
name = 'qryDetail'.....

and at open ... raise excepetion....

Please...help me

Rino

Sorry for my english.

p.s. I use Delphi2005 Win32 and DB2 rel.7.2
 

Re:Re: Master Detail

but if i have only one Detail, i dont need to set this parameters and this properties...
Why?
Regards,
Rino.
"Robert Gilland" < XXXX@XXXXX.COM >wrote:
Quote
Have you added Matching Parameters in the Detail Clientdataset and
set the MasterSource/MasterFields properties of the Detail Client DataSet;

Regards,

Robert.


"Rino " < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>
>Hi,
>i have this configuration at run-time :
>
>DataModulo1 :
>1) qryMaster (TSQLQuery)
>2) ProviderMaster (TDataSetProvider) with dataSet := qryMaster
>3) CdsMaster (TClientDataSet) with ProviderName := 'ProviderMaster'
>
>DataModulo2 :
>
>1) dtsMasterDetail (TDataSource) with DataSet := qryMaster
>2) qryDetail (TSQLQuery) with DataSource := dtsMasterDetail
>3) cdsDetail (TClientDataSet) with DataSetField :=
>CdsMaster.FieldByName('qryDetail')
>
>If i have a Master and a Detail, it's ok, but, if i have two Detail :
>dmDetail1 : TDataModulo2;
>dmDetail2 : TDataModulo2;
>
>and ....
>
>dmDetail1.qryDetail.Sql.Text := 'SELECT * FROM TABLE_DETT1 WHERE
>DTCOD = : MTCOD';
>
>dmDetail2.qryDetail.Sql.Text := 'SELECT * FROM TABLE_DETT2 WHERE
>DTCOD = : MTCOD';
>
>when i create the DataSetFields on Master ClientDataSet both have the
>name = 'qryDetail'.....
>
>and at open ... raise excepetion....
>
>Please...help me
>
>Rino
>
>Sorry for my english.
>
>p.s. I use Delphi2005 Win32 and DB2 rel.7.2


 

Re:Re: Master Detail

"Rino " < XXXX@XXXXX.COM >сообщи?сообщила ?новостях следующе?
Quote

Hi,
i have this configuration at run-time :

DataModulo1 :
1) qryMaster (TSQLQuery)
2) ProviderMaster (TDataSetProvider) with dataSet := qryMaster
3) CdsMaster (TClientDataSet) with ProviderName := 'ProviderMaster'

DataModulo2 :

1) dtsMasterDetail (TDataSource) with DataSet := qryMaster
2) qryDetail (TSQLQuery) with DataSource := dtsMasterDetail
3) cdsDetail (TClientDataSet) with DataSetField :=
CdsMaster.FieldByName('qryDetail')

If i have a Master and a Detail, it's ok, but, if i have two Detail :
dmDetail1 : TDataModulo2;
dmDetail2 : TDataModulo2;

and ....

dmDetail1.qryDetail.Sql.Text := 'SELECT * FROM TABLE_DETT1 WHERE
DTCOD = : MTCOD';

dmDetail2.qryDetail.Sql.Text := 'SELECT * FROM TABLE_DETT2 WHERE
DTCOD = : MTCOD';

when i create the DataSetFields on Master ClientDataSet both have the
name = 'qryDetail'.....

and at open ... raise excepetion....

Please...help me

Rino

Sorry for my english.

p.s. I use Delphi2005 Win32 and DB2 rel.7.2
As you probably know each Detail is reflected to TDatasetField with name of
detail in Fields collection of TClientDataSet. So if you will have 2 details
with same name this will result in naming conflict. Just change name for one
of the details to resolve this conflict.
 

Re:Re: Master Detail

Quote
Just change name for one
of the details to resolve this conflict.
ok, but so i lose patterns in my all project!
I have :
- One standard datamodule for Master date
- One standard datamodule for Detail date
- One standard form for simple tables
- One standard form for MasterTable
- One standard FRAME for DetailTable.
Regards,
Rino.
 

Re:Re: Master Detail

"Rino" < XXXX@XXXXX.COM >сообщи?сообщила ?новостях следующе?
Quote

ok, but so i lose patterns in my all project!
I have :

- One standard datamodule for Master date
- One standard datamodule for Detail date
- One standard form for simple tables
- One standard form for MasterTable
- One standard FRAME for DetailTable.

Regards,

Rino.
So change yours pattern. I don't think that any serious will match this
oversimplified pattern. In fact it is already doesn't match since you do
have 2 Detail Tables.
 

Re:Re: Master Detail

i have insert a new TSQLQuery, new TDataSource and new TClientDataSet.
but the problem persist...
even at Design-Time....
please..help me!!!
 

Re:Re: Master Detail

Drop old fielddefs and persistent fields before opening ClientDataSet at
design time.
 

Re:Re: Master Detail

Quote
Drop old fielddefs and persistent fields before opening ClientDataSet at
design time.
now, i have new project for examples.
This project work with Delphi6, but not work with Delphi2005...
Why?
Is it a bug?
Regards,
Rino.
 

Re:Re: Master Detail

i have replaced the file dbexpdb2.dll with delphi6 dbexpdb2.dll and it'is work...
but i cannot to work with this obsolete library!
Please Help me....
 

Re:Re: Master Detail

Hi all
I am using interbase 6.5 with builder 6 im new to interbase can i implement
a master/detail situation like the TDataset uses in paradox and if so what
component do i use
thank you
Robert
 

Re:Re: Master Detail

"Robert H cave" < XXXX@XXXXX.COM >wrote:
Quote
Hi all
I am using interbase 6.5 with builder 6 im new to interbase can i implement
a master/detail situation like the TDataset uses in paradox and if so what
component do i use
thank you
Robert


Take a look at the IBX Components.
TIBDataset is a descendent from TDataset.
HTH
Antonio