Frank Burleigh
2008-05-16 04:44:16 UTC
I thought I'd freshen up an *old* BDE application that's been using our
old Sybase database. I've moved the data it uses to our Oracle instance
and thought I'd also ditch BDE in favor the DBX and client data sets.
I'm working in RAD 2007 (C++, mainly). I've accepted warnings against
the evils of master/detail done with TSimpleDatasets so thought I'd
spend a couple hours trying the nested approach so often suggested.
It's been a very long two hours. ;-)
There are two tables, A and B. B is detail. I've created:
For table A:
- aSDS_A select * from a
- aDSP_A whose datasource is aSDS_A
- aCDS_A whose provider is aDSP_A
- aDS_A whose dataset is aDSP_A
For table B:
- aSDS_B select * from B where db_obj=:db_obj (created param, input,
string, gave it a value in the designer), with datasource aDS_A.
- aCDS_B can't set DataSetField
- aDS_B with dataset aCDS_B
I believe the two CDSs are the trouble: the one for A doesn't
automagically create a TDataSetField for the data that should come from
aSDS_B. And unless there's some magical inferance from aSDS_B's
datasource being set to aDS_A, I don't quite understand why it would.
Because aCDS_A has no TDatasetField, it can't enter the picture.
I did find one paper:
http://conferences.codegear.com/article/32229#MasterDetail
but can't duplicate the behavior of the fields editer shown in figure
12, where the TDataSetField has been created by the designer.
So I'm stuck, and would appreciate some help forward.
Thanks very much.
old Sybase database. I've moved the data it uses to our Oracle instance
and thought I'd also ditch BDE in favor the DBX and client data sets.
I'm working in RAD 2007 (C++, mainly). I've accepted warnings against
the evils of master/detail done with TSimpleDatasets so thought I'd
spend a couple hours trying the nested approach so often suggested.
It's been a very long two hours. ;-)
There are two tables, A and B. B is detail. I've created:
For table A:
- aSDS_A select * from a
- aDSP_A whose datasource is aSDS_A
- aCDS_A whose provider is aDSP_A
- aDS_A whose dataset is aDSP_A
For table B:
- aSDS_B select * from B where db_obj=:db_obj (created param, input,
string, gave it a value in the designer), with datasource aDS_A.
- aCDS_B can't set DataSetField
- aDS_B with dataset aCDS_B
I believe the two CDSs are the trouble: the one for A doesn't
automagically create a TDataSetField for the data that should come from
aSDS_B. And unless there's some magical inferance from aSDS_B's
datasource being set to aDS_A, I don't quite understand why it would.
Because aCDS_A has no TDatasetField, it can't enter the picture.
I did find one paper:
http://conferences.codegear.com/article/32229#MasterDetail
but can't duplicate the behavior of the fields editer shown in figure
12, where the TDataSetField has been created by the designer.
So I'm stuck, and would appreciate some help forward.
Thanks very much.