oDataSet:SetRelation()
Publicado: Lun Oct 06, 2008 10:59 pm
I am trying to display two DBBrowse objects in a form with a parent/child
relationship between them.
oDbfDataSetFeeGroups is the Parent.
oDbfDataSetGroupAllocations is the Child
The foreign key in the Child is field ALLOCID and the Child dbf is indexed
on that field. It is the only index for the child table.
Here is what I put in the oForm:Initialize() event:
::oDbfDataSetFeeGroups:Select()
::oDBfDataSetFeeGroups:SetRelation("Allocid" ,
::oDbfDataSetGroupAllocations)
::oDbfDataSetFeeGroups:GoTop() // probably not needed
::oDBBrowseFeeGroups:GoTop()
::oDBBrowseFeeGroups:SetFocus()
The Parent DBBrowse shows records, the Child DBBrowse object does not. I
have verified that I have sample data in the child dbf that matches parent
records.
Why doesn't this work?
TIA,
Gary
relationship between them.
oDbfDataSetFeeGroups is the Parent.
oDbfDataSetGroupAllocations is the Child
The foreign key in the Child is field ALLOCID and the Child dbf is indexed
on that field. It is the only index for the child table.
Here is what I put in the oForm:Initialize() event:
::oDbfDataSetFeeGroups:Select()
::oDBfDataSetFeeGroups:SetRelation("Allocid" ,
::oDbfDataSetGroupAllocations)
::oDbfDataSetFeeGroups:GoTop() // probably not needed
::oDBBrowseFeeGroups:GoTop()
::oDBBrowseFeeGroups:SetFocus()
The Parent DBBrowse shows records, the Child DBBrowse object does not. I
have verified that I have sample data in the child dbf that matches parent
records.
Why doesn't this work?
TIA,
Gary